aspose file tools*
The moose likes JBoss/WildFly and the fly likes JBoss 5.1 throwing error for missing jsp files in /WEB-INF folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss 5.1 throwing error for missing jsp files in /WEB-INF folder" Watch "JBoss 5.1 throwing error for missing jsp files in /WEB-INF folder" New topic
Author

JBoss 5.1 throwing error for missing jsp files in /WEB-INF folder

M. Phaneendra Vijay
Greenhorn

Joined: Jun 10, 2009
Posts: 26
Hi,

I have previously used JBoss 4.0.4. In that, if I include a jsp file that does not exist in /WEB-INF folder, then it skipped the statement without throwing any exception. Now I have upgraded to JBoss 5.1. It is throwing an error now for a jsp file that does not exist. I want the JBoss 5.1 to behave like JBoss 4.0.4 in this case. Please help me.

Thanks in advance.
Phaneendra Vijay.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Where is the jsp file name "included" which causes this error? Also please post the entire exception stacktrace.

While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.


[My Blog] [JavaRanch Journal]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Jaikiran Pai wrote:Where is the jsp file name "included"





He didn't say the jsp file was called "included".

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
M. Phaneendra Vijay
Greenhorn

Joined: Jun 10, 2009
Posts: 26
I have a file called quickSearch.jsp, in which quickSearchParams.jsp is included using <jsp:include....> tag. The file quickSearchParams.jsp does not exist in some cases. In JBoss 4.0.4, if it does not find a file (say quickSearchParams.jp), it skips the file without throwing the exception.

Now I have upgraded to JBoss 5.1.0. Since the quickSearchParams.jsp does not exist, it threw the following error. I want the JBoss 5.1.0 to skip the non existent files without throwing any exceptions.


2009-06-11 09:56:50,000 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/directory].[jsp]] (http-127.0.0.1-8080-2) Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException: File "/directory/search/quickSearchParams.jsp" not found
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:300)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:543)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:480)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.jsp.commonapp.search.quickSearch_jsp._jspService(quickSearch_jsp.java:143)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:543)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:480)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.jsp.commonapp.search.search_jsp._jspx_meth_html_005fform_005f0(search_jsp.java:1277)
at org.apache.jsp.jsp.commonapp.search.search_jsp._jspService(search_jsp.java:228)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:543)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:480)
at org.apache.struts.action.RequestProcessor.doInclude(RequestProcessor.java:1087)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:258)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:543)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:480)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.jsp.commonapp.layout.homepage.homePageLeftPane_jsp._jspx_meth_c_005fwhen_005f7(homePageLeftPane_jsp.java:873)
at org.apache.jsp.jsp.commonapp.layout.homepage.homePageLeftPane_jsp._jspx_meth_c_005fchoose_005f1(homePageLeftPane_jsp.java:802)
at org.apache.jsp.jsp.commonapp.layout.homepage.homePageLeftPane_jsp._jspService(homePageLeftPane_jsp.java:196)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:543)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:480)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:611)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:101)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:137)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:758)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:890)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
at org.apache.jsp.jsp.commonapp.layout.homepage.homePageBody_jsp._jspx_meth_t_005finsert_005f0(homePageBody_jsp.java:154)
at org.apache.jsp.jsp.commonapp.layout.homepage.homePageBody_jsp._jspService(homePageBody_jsp.java:82)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:543)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:480)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:611)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:101)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:137)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:758)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:890)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
at org.apache.jsp.includes.cw3.template_jsp._jspx_meth_t_005finsert_005f1(template_jsp.java:3067)
at org.apache.jsp.includes.cw3.template_jsp._jspService(template_jsp.java:534)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:237)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.chronologic.web.CommonVarsFilter.doFilter(CommonVarsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.chronologic.singlesignon.web.BaseSingleSignOnFilter.doFilter(BaseSingleSignOnFilter.java:82)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Hmm, here is the problem and I am not sure if I am even correct. I haven't read the specification.

But maybe it throws an exception because the specification says the app server must throw an exception if a jsp file is not there.

But, why would you include a file that you don't include in the package. Is it based on something. Can you use JSTL EL in your jsp page that looks at something and doesn't include it if it returns?

Mark
M. Phaneendra Vijay
Greenhorn

Joined: Jun 10, 2009
Posts: 26
yes, the include is based on something - application name.
I have three applications a, b and c.
All applications use the quickSearch.jsp, which includes quickSearchParams.jsp.
In application a, I have quickSearchParams.jsp and in applications b and c, quickSearchParams.jsp does not exist.

I should not hard code the application name. And there are numerous files where this sort of a thing happens.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

M. Phaneendra Vijay wrote:yes, the include is based on something - application name.
I have three applications a, b and c.
All applications use the quickSearch.jsp, which includes quickSearchParams.jsp.
In application a, I have quickSearchParams.jsp and in applications b and c, quickSearchParams.jsp does not exist.

I should not hard code the application name. And there are numerous files where this sort of a thing happens.


No not hardcoding the application. But there is differences, so you can't really "re-use" that jsp if it fails when you don't have an include file in the package. So you have to change the quickSearch.jsp page in some way so that in App b and c it doesn't have the include in it.

Mark
M. Phaneendra Vijay
Greenhorn

Joined: Jun 10, 2009
Posts: 26
Thanks for your reply.

Yes, I can put a condition to include or not include a file based on the application name. But the problem is that there are many files to change.

All I want to know is whether JBoss 5.1.0 has an option to skip non-existent jsp includes, like in JBoss 4.0.4.

Phani.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss 5.1 throwing error for missing jsp files in /WEB-INF folder