This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Tomcat and the fly likes cross context jsp include Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "cross context jsp include" Watch "cross context jsp include" New topic
Author

cross context jsp include

Tania Smuts
Greenhorn

Joined: Jul 21, 2004
Posts: 7
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

Joined: Jan 10, 2002
Posts: 56207
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: cross context jsp include
 
Similar Threads
Forward to different URL and pass parameters
diff. between jsp:include and include directive
cross context access c:import
Mapping JSP
Difference JSP File & JSP Page