tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <epr...@ptc.com>
Subject dispatcher.forward(), but with new URL
Date Fri, 10 Jan 2003 19:14:31 GMT
Hi,

Sorry if this is too simple a question, I'm still just getting my first 
JSP/servlet application underway.

I have a servlet called LoginServlet, that is passed some POST 
parameters and does some processing with them.  There are two possible 
outcomes -- one is that the authentication fails and the user is sent to 
a page indicating that they failed to log in.

The other outcome is that the user is taken to "main.jsp", which is a 
JSP that I have written which serves as a kind of welcome page for 
logged-in users.

The technique that I would use to do this redirection is to call 
getRequestDispatcher() from the servlet context and employ the forward() 
method of the RequestDispatcher object.  The problem is that doing so 
preserves the original URL of LoginServlet.

My question is: how can I send the user to "main.jsp" without using 
dispatcher.forward(), so that the URL is appropriately displayed as 
"main.jsp" (plus any other URL parameters such as URL-encoded session 
data, etc)?

I would like to do this without using filters since I haven't learned 
how to use these yet.

Thank you,


Erik


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message