RE: Forwarding from one Context to another

2009-03-30 Thread behofmann
Chuck, I made some modifications to my relative paths and everything is now working. Thanks again for your help. Brandon Caldarale, Charles R wrote: > >> From: behofmann [mailto:behofm...@gmail.com] >> Subject: Re: Forwarding from one Context to another >> >>

RE: Forwarding from one Context to another

2009-03-30 Thread Caldarale, Charles R
> From: behofmann [mailto:behofm...@gmail.com] > Subject: Re: Forwarding from one Context to another > > The complete path should be /dev/jsp/index.jsp. Correct? I believe so. > Unfortunately, I get a blank page in my browser and the page properties > show /filter/jsp/inde

Re: Forwarding from one Context to another

2009-03-29 Thread behofmann
Chuck, Thank you again for your help. Since I'm new at this, please forgive me if my questions seem elementary. The following code now works: ServletContext appContext = getServletContext().getContext( "/dev" ); if ( appContext != null ) { RequestDispatcher rd = appContex

Re: Forwarding from one Context to another

2009-03-29 Thread Hassan Schroeder
On Sun, Mar 29, 2009 at 5:52 PM, Caldarale, Charles R wrote: >> ServletContext appContext = >> this.getServletConfig().getServletContext().getContext( "/dev" ); > > You certainly don't need "this" in the above; nor is getServletConfig() > necessary, if the code is in a class that extends HttpSer

RE: Forwarding from one Context to another

2009-03-29 Thread Caldarale, Charles R
> From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com] > Subject: Re: Forwarding from one Context to another > > ServletContext appContext = > this.getServletConfig().getServletContext().getContext( "/dev" ); You certainly don't need "this&quo

Re: Forwarding from one Context to another

2009-03-29 Thread Hassan Schroeder
On Sun, Mar 29, 2009 at 4:34 PM, behofmann wrote: > > When trying to forward my .jsp to another in Tomcat 6.0.18 using > the following code, I get the following error: > >      ServletContext appContext = ServletContext.getContext( "/dev" ); Try: ServletContext appContext = this.getServletConfi

RE: Forwarding from one Context to another

2009-03-29 Thread Caldarale, Charles R
> From: behofmann [mailto:behofm...@gmail.com] > Subject: Re: Forwarding from one Context to another > > When trying to forward my .jsp to another in Tomcat > 6.0.18 using the following code, I get the following error: > > ServletContext appContext = ServletCont

Re: Forwarding from one Context to another

2009-03-29 Thread behofmann
When trying to forward my .jsp to another in Tomcat 6.0.18 using the following code, I get the following error: ServletContext appContext = ServletContext.getContext( "/dev" ); if ( appContext != null ) { RequestDispatcher rd = appContext.getRequestDispatcher( context

Re: Forwarding from one Context to another

2009-03-29 Thread behofmann
Gregor, Thank you for the additional information. I will try the technique we discussed and post back if I have further questions. Thanks, Brandon Gregor Schneider wrote: > > Brandon, > > please reply to the list so that other ppl also benefit from this. > > On Sun, Mar 29, 2009 at 3:22 P

Re: Forwarding from one Context to another

2009-03-29 Thread Gregor Schneider
Brandon, please reply to the list so that other ppl also benefit from this. On Sun, Mar 29, 2009 at 3:22 PM, wrote: > > Thanks for the quick reply! After using the approach you mentioned, I would > then use the RequestDispatcher to complete the forward to the new context. > Correct? > Haven'

Re: Forwarding from one Context to another

2009-03-29 Thread Gregor Schneider
Brandon, within the Context-definition of the COntext *from* where you want to forward, you'll have to specify Forwarding works like this: ServletContext otherContext = servletContext.getContext("/othercontext"); // The context may be null if the application server does not permit cross-cont