tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rseque...@transentric.com
Subject Re: jsp:forward to a different context
Date Wed, 18 Sep 2002 14:25:22 GMT

Say you wish to forward from Context "A" to Context "B". You need to do two
things:

1) Turn the crossContext attribute to "true" in server.xml

2) In your code:
<%
   ServletContext ctxB = application.getContext("/B");
   RequestDispatcher rdB = ctxB.getRequestDispatcher
("<file_name_relative_to_context_B");
   rdB.forward(request, response);
%>

RS



                                                                                         
                 
                      William Wragg                                                      
                 
                      <william@datapro.        To:       "Tomcat Users List"          
                    
                      co.uk>                    <tomcat-user@jakarta.apache.org>
                          
                                               cc:                                       
                 
                      09/18/02 09:14 AM        Subject:  jsp:forward to a different context
               
                      Please respond to                                                  
                 
                      "Tomcat Users                                                      
                 
                      List"                                                              
                 
                                                                                         
                 
                                                                                         
                 




Hi,

Is there any way to forward to a different context(webapp) from within a
JSP?

I am running Tomcat 4.0.4

Regards,

Wm.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.389 / Virus Database: 220 - Release Date: 16/09/2002

--
To unsubscribe, e-mail:   <
mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:tomcat-user-help@jakarta.apache.org>





--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message