java org.apache.jasper.JasperException
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5218421/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
org.apache.jasper.JasperException
提问by user647956
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...
请问哪位能帮帮我...
回答by ddsh79
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.
您可以添加一些自动初始化程序或等待一段时间使其完全加载。
回答by BalusC
Here's an extract of relevance of the JspServletWrapper#handleJspException()
source.
这是JspServletWrapper#handleJspException()
来源相关性的摘录。
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.
显然,JSP 在第一次访问时是空的。你使用什么框架?我还没有见过在启动时自动生成 JSP 文件或类似的框架。它可能需要一些配置微调。
回答by Antoine
I met this problem because of web.xml misconfiguration.
由于 web.xml 配置错误,我遇到了这个问题。
I tried to add *.jar to be served by JspServlet.
我试图添加 *.jar 由 JspServlet 提供服务。
You certainly did an error in Servlet mapping in your web.xml.
您肯定在 web.xml 中的 Servlet 映射中犯了错误。