简体   繁体   English

代码在AS7(JBoss)中有效,但在Tomcat 7中无效

[英]Code works in AS7(JBoss) but not Tomcat 7

Code works in AS7(JBoss) but not Tomcat 7. I am working on a Spring MVC project and I need to access the header and footer from a diff project so I insert the follow code in my JSP and it works great on JBoss but not on tomcat7 代码可以在AS7(JBoss)中工作,但不能在Tomcat 7中工作。我正在处理Spring MVC项目,我需要从diff项目访问页眉和页脚,因此我将以下代码插入我的JSP中,但在JBoss上却可以正常工作在tomcat7上

<c:import url="/webapphead.jsp" context="/common" />

this is the error I am getting in tomcat: 这是我进入tomcat的错误:

2013-03-22 08:46:54,942 [http-bio-8080-exec-3] DEBUG org.springframework.web.servlet.DispatcherServlet - Could not complete request
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Unable to get RequestDispatcher for Context: "/common" and URL: "/webapphead.jsp". Verify values and/or enable cross context access.

Did you set the crossContext to true ? 您是否将crossContext设置为true Check the documentation . 检查文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM