Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute another servlet from the current servlet

Status
Not open for further replies.
as i already said
i do not want to use the URL method
 
Look at the UrlConnection class
 
where to get the URLConnection class?
I tried using the requestdispatcher but it did not work
 
>>>>> where to get the URLConnection class?
Please look at the documentation at :


>>>>> I tried using the requestdispatcher but it did not work
There are no methods of class RequestDispatcher that return a URLConnection object, or to my knowledge in the javax.servlet package or sub-packages.

Why can you not use the redirect() or include() methods of the RequestDispatcher ? These handle pretty much anything you could want to do to control pacge flow from a servlet.

Another problem is why are you calling a servlet from another servlet ... standard practice is for a web application to have only one 'Controller' Servlet - so there is only one place which controls and redirects page flow and business logic ... you may want to consider your reasons/ and /or redesign your application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top