| Author |
forward in a servlet
|
Javed Mohammed
Greenhorn
Joined: Sep 29, 2005
Posts: 17
|
|
Hi, I just started a web app with login jsp and a servlet. When the login is successful, user should get a welcome message, other wise login page should be displayed with error message. This is working fine except for one small glitch. my login URl is loclahost:8080/webApp/Login.jsp when the servlet is forwarding, the url in the address bar is displayed as http://it-laptop2:8080/webApp/servlet/controlerservlet insted of loclahost:8080/webApp/Login.jsp Is this normal or am I doing something wrong? I am using Tomcat 6 server and my servlet code looks like this.....
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
|
As this is not Tomcat-specific, it has been moved to the Servlets forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
A forward doesn't change the URL in the address window at all. Can you post the page containing the login form?
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
|
|
|
As already mantioned, forwarding occurs on the backend and the user is not aware that it happened since teh URL remains the same. i.e in this case controllerServlet.
|
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
|
 |
Javed Mohammed
Greenhorn
Joined: Sep 29, 2005
Posts: 17
|
|
okay, I thnk I got it. Sicne the foward does not change the URL, it is stying the same on the browse. I guess I was concerned for no reason. As mentioned earlier, the app is working fine Thank ya'all for the help.
|
 |
 |
|
|
subject: forward in a servlet
|
|
|