Org.apache.jasper.JasperException

when I open the first website its show error like this

HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:130) org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:107) org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:78) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:383) root cause java.lang.NullPointerException org.apache.jsp.index_jsp._jspService(index_jsp.java:73) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:130) org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:107) org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:78) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:383) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.28 logs. 

but if I update, then the site will be perfectly open, but if you leave it idle someday, then if u opens nearby, then there will also be the same error after that, if u is updated, then the site will open perfectly this is the problem, its application throughout the application on any page.

+4
source share
4 answers

java.lang.NullPointerException org.apache.jsp.index_jsp._jspService (index_jsp.java:73)

Go to the Tomcat /work/Catalina/localhost folder, then open the folder corresponding to the webapp context name, then open the /org/apache/jsp/index_jsp.java file and read line 73. Drop this line into your own original index.jsp file in website root directory and fix it accordingly.

Or, if a particular line of code cannot in any way be discarded by your own code and, thus, is specific to your own, then this is more likely an error or an incorrect configuration. Please update your question to include it so that we can help you in the future. Be sure to include the exact version of Tomcat.

+6
source

In my case, it was a line in jsp:

 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"pageEncoding="ISO-8859-1"%> 

Make sure there is a space between: " and the following attribute.

+4
source

In my case, the error was shown because my class attributes and table attributes did not match.

I work at hibernate.

So if your case is the same as mine, a possible solution might be:

  1. Edit your .java file
  2. Edit your .hbm.xml file
  3. Delete the table that was already created in your database.
  4. Restart project

If it still does not work, you need to check the values โ€‹โ€‹entered in your object. Example: if you declared an attribute as a string, then it should contain only a string object.

Note: Hibernate creates the table itself. Therefore, there is no need to create tables manually.

0
source

If it can help: I โ€‹โ€‹have the same problem with a simple HTML page that makes a selection * from the postgres table.

The problem was that I imported my external library along the build path, but as a result of the webContent file, I skipped the whole library that I imported.

I am doing brute force XD copying and pasting jar files (postgresSql jdbc and catalina root for tomcat server) to: Web-inf โ†’ lib ... and now it works!

I do not know if this is an elegant way to solve the problem, but it works!

0
source

Source: https://habr.com/ru/post/1343605/


All Articles