11 Jan 2006 11:09
manipulating the http requests.....
J2EE Professional <javasubscriptions <at> yahoo.co.in>
2006-01-11 10:09:11 GMT
2006-01-11 10:09:11 GMT
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... Any ideas..? Best Regards --------------------------------- To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. [Non-text portions of this message have been removed] Before posting a question, try to find your answer here: <http://www.egroups.com/links/advanced-servlets>(Continue reading)
RSS Feed