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!

Can I use Servlets to redirect user 1

Status
Not open for further replies.

SalShaikh

Programmer
May 15, 2002
16
0
0
US
Hi all,

I am writing a servlet that logs a person in to my system.
My code for logging in and checking a successful login works but How would i redirect the user to go to a specific URL when logged in.
I am using the following code:
Code:
response.setHeader("Location","[URL unfurl="true"]http://www.tek-tips.com");[/URL]
Is this correct or should I do something else
any input would be helpful

thanks
Sal
 
Try response.sednRedirect( String location ).

That should redirect the user to whatever location you want.

-gc
 
that should be response.sendRedirect( String location )

sorry for the typo

-gc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top