org.apache.jasper.JasperException

守給你的承諾、 提交于 2019-12-12 03:56:31

问题


When i open first time my application its show error like

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.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:183)
    org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:125)
    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)

But i refreshed again then it will open fine without error.

What is the problem and how to fix this?

Please can any one help me...


回答1:


it looks like your application requires some initialization of code which takes time. now while you open the page it is initializing things in background and you see error due to uninitialized or partial initialized values.

you can add some auto initializers or wait for some time to get it loaded completely.




回答2:


Here's an extract of relevance of the JspServletWrapper#handleJspException() source.

456         // If the line number is less than one we couldn't find out
457         // where in the JSP things went wrong
458         int jspLineNumber = detail.getJspBeginLineNumber();
459         if (jspLineNumber < 1) {
460             throw new JasperException(ex);
461         }

Apparently the JSP was empty on first access. What frameworks are you using? I haven't seen a framework before which autogenerates JSP files on startup or something like that. It might need some configuration finetuning.




回答3:


I met this problem because of web.xml misconfiguration.

I tried to add *.jar to be served by JspServlet.

You certainly did an error in Servlet mapping in your web.xml.



来源:https://stackoverflow.com/questions/5218421/org-apache-jasper-jasperexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!