Preciso de ajuda, quando executo a pagina JSP aparece este erro Status 500 como segue código abaixo.
Type Exception Report
Message Unable to compile class for JSP:
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [2] in the jsp file: [/novaEmpresaCriada.jsp]
req.System.out cannot be resolved to a type
1: <%
2: String nomeEmpresa = req.
3: System.out.println(nomeEmpresa);
4:
5: %>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:213)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:489)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:392)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:346)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:603)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:400)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:383)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:770)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
br.mercado.empresaNova.doPost(empresaNova.java:32)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:689)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:770)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Note A pilha de erros completa da causa principal está disponível nos logs do servidor.
Type Exception Report
Message Unable to compile class for JSP:
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [2] in the jsp file: [/novaEmpresaCriada.jsp] req.System.out cannot be resolved to a type 1: <% 2: String nomeEmpresa = req. 3: System.out.println(nomeEmpresa); 4: 5: %>
Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:213) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:489) org.apache.jasper.compiler.Compiler.compile(Compiler.java:392) org.apache.jasper.compiler.Compiler.compile(Compiler.java:362) org.apache.jasper.compiler.Compiler.compile(Compiler.java:346) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:603) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:400) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:383) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:770) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) br.mercado.empresaNova.doPost(empresaNova.java:32) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:689) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:770) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) Note A pilha de erros completa da causa principal está disponível nos logs do servidor.