Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cross context jsp include

 
Tania Smuts
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have servlet "A" forwarding to "a.jsp" under project a. In "a.jsp" I have the
following JSTL line :


<c:import url="/includes/doingheader.htm" context="/extemplates/"/>


but when this runs it produces the following exception :

javax.servlet.ServletException: Unable to get RequestDispatcher for
Context: "/extemplates/" and URL: "/includes/doingheader.htm". Verify
values and/or enable cross context access.



"extemplates" is a web project B defined in MyEclipse 3.81 with a folder
"includes".

How do I allow "a.jsp" to cross reference another project (B).

Eclipse 3.01
Tomcat 5.0.25
JSTL 1.0
JDK 1.4.2

Can someone steer me in the right direction please.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set the crossContext attribute to "true" for the Context entry in server.xml

Aside: why are you using JSTL 1.0 with Tomcat 5? You should be using JSTL 1.1.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic