What about:
ServletContext sctx= getServletContext();
ServletContext targetCtx=sctx.getContext( "/login" );
RequestDispatcher rd=targetCtx.getNRD (... );
Costin
> // get the 'console' context, from which the /login servlet is
> // invoked. (class invoked is one I developed for our application)
> //
> Context sc = ServerUtils.getConsoleContext ();
>
> // get the ServletWrapper that matches the /login servlet, in order
> // to get to its respective RequestDispatcher
> //
> ServletWrapper s = (ServletWrapper) sc.getServletByName (
> Constants.Context.Console.Components.Login);
>
> // get the RequestDispatcher associated with the /login servlet
> //
> RequestDispatcher rd =
> s.getServlet().getServletConfig().getServletContext().getNamedDispatcher(
> Constants.Context.Console.Components.Login);
>
> rd.forward (req, res);
>
>
> I was wondering if there was a more straightforward way to evaluate the
> RequestDispatcher than the one I figured out.
>
> Thanks,
>
> Arieh
> --
> Arieh Markel Sun Microsystems Inc.
> Network Storage 500 Eldorado Blvd. MS UBRM11-194
> e-mail: arieh.markel@sun.COM Broomfield, CO 80021
> Let's go Panthers !!!! Phone: (303) 272-8547 x78547
> (e-mail me with subject SEND PUBLIC KEY to get public key)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
|