Re: manipulating the http requests.....

Nic Ferrier <[email protected]> Wed, 11 Jan 2006 10:54:50 +0000
Newsgroups gmane.comp.java.advanced-servlets
Message-ID <[email protected]>
J2EE Professional <[email protected]> writes:

>   Hi Guys,
>    
>   Right now i have a servlet which is doing some processing. This
>   servlet is the main servlet of the application or the entry point
>   to my web application. Now what i want to do is that i want to
>   change the entry point to my web application from this mainServlet
>   to a new servlet (say newServlet.java). So now, the request should
>   come to this new component and then should be delegated to the
>   mainServlet....also the response should be relayed thorugh
>   newServlet only... How can i acheive this.
>    
>   One way is that i can modify the web.xml and for the URL pattern
>   of mainServlet i will invoke newServlet instead. But then in this
>   case how do i invoke the mainServlet from newServlet then....Or
>   else i could have a filter before the mainServlet. Actually, this
>   newServlet need not be a servlet also...the requirement dosent ask
>   this to be a servlet. it could be a java class also...what the
>   requirement says is that that the entry point should be
>   changed...and the response should also be changed...but i dont c
>   any other way of chaging the entry point...since its a web
>   application it has to be a servlet or filter....
>    
>   Also, if i have newServlet, how do i invoke a method in
>   mainServlet...say there is a foo() in mainServlet, how do i invoke
>   it from newServlet...

Why won't a RequestDispatcher work?


Nic


Before posting a question, try to find your answer here: 
<http://www.egroups.com/links/advanced-servlets>
Announcements should go to: [email protected]
To Post a message, send it to: [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/advanced-servlets/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/