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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Servlets

Status
Not open for further replies.

komyg

Programmer
Dec 13, 2005
68
BR
Hi I`m new to J2EE and I am programming servlets.

I would like to know how can I send the client to another web page when I get the parameter Foo on a doPost method on a HTTPServlet?

doPost (...)
{
if (request.getParameter("Foo")!=null)
{
// Send the client to the Foo web page.
}
}

Thanks,
Komyg
 
Look at the RequestDispatcher object (obtainable from the HttpServletResponse object).

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
That works very well.

Thanks,
Komyg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top