0

I'm running the stock Java and Tomcat from the Fedora 21 distro, which has been working fine with my apps until the Tomcat 7.0.59 update came down recently. Now setting crossContext="true" does not prevent a fatal exception being thrown, which is the exception one would normally see if one had set crossContext="false". Here's the Tomcat version:

Server version: Apache Tomcat/7.0.59
Server built:   Feb 14 2015 21:28:39 UTC
Server number:  7.0.59.0
OS Name:        Linux
OS Version:     3.18.9-200.fc21.x86_64
Architecture:   amd64
JVM Version:    1.8.0_40-b25
JVM Vendor:     Oracle Corporation

And here's the exception being thrown:

javax.servlet.jsp.JspTagException: Unable to get RequestDispatcher for
Context: "/" and URL: 
"/calendar.jsp?nid=0&pid=185&layoutpane_id=7&cid=276&accessuser=".
Verify values and/or enable cross context access.

Any ideas? There seems to have been work on cross-context request dispatching in recent Tomcat versions, but I can't find anything that addresses this specifically. Here's the full exception trace:

javax.servlet.jsp.JspTagException: Unable to get RequestDispatcher for Context: "/" 
and URL: "/calendar.jsp?nid=0&pid=185&layoutpane_id=7&cid=276&accessuser=".
Verify values and/or enable cross context access. 
org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:278) 
org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:161)
org.apache.jsp.index_jsp._jspService(index_jsp.java:3021) 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221) 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) 
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190) 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
Sam Hokin
  • 660
  • 1
  • 6
  • 15
  • I will add that there's an update in the Changelog that says a warning will be thrown for an invalid cross-context URL, but it's a warning, not a fatal exception, and the URL will be automatically fixed (ending slashes, etc.). And it's not the exception being thrown here. – Sam Hokin Mar 29 '15 at 14:25
  • which version was it before the update? – eis Mar 29 '15 at 15:20
  • Pre-upgrade: Server version: Apache Tomcat/7.0.54 Server built: Jun 16 2014 08:38:46 Server number: 7.0.54.0 OS Name: Linux OS Version: 3.18.9-200.fc21.x86_64 Architecture: amd64 JVM Version: 1.8.0_40-b25 JVM Vendor: Oracle Corporation ... I did a yum downgrade to this version and the crossContext exception vanished. So it's a change between 7.0.54 and 7.0.59. – Sam Hokin Mar 29 '15 at 15:57
  • I wonder, would it be [this change](https://bz.apache.org/bugzilla/show_bug.cgi?id=56677) then – eis Mar 29 '15 at 16:05
  • Looks very suspicious, but Mark says it was fixed in 7.0.55 onwards. Maybe not, though. I'll see if I can get any action over on Apache bugzilla - thanks! – Sam Hokin Mar 29 '15 at 16:08
  • yes, I meant that the fix itself might have caused the problem you are seeing. – eis Mar 29 '15 at 16:09

0 Answers0