| Author |
servlet name in url. how to get rid?
|
adeeb alexander
Ranch Hand
Joined: May 29, 2008
Posts: 255
|
|
Hi.
I have a servlet which takes values from loing.jsp, if the user is found the page is forwarded to home.jsp. The problem is I am getting the servlet name in the url, which is unnecessary for me, due to that the user will know the servlet name also. So how can i get rid of that. Show me the easiest way, please.
Thanks and Regards.
Adeeb
|
 |
Kumaravadivel Subramani
Ranch Hand
Joined: Jul 05, 2008
Posts: 159
|
|
|
By knowing the servlet name the user cannot do anything if original servlet name has mapped appropriately in web.xml file. Actually the mapped servlet name only will be displayed, if you have not configured then it would be a problem.
|
No pain, No gain.
OCJP 1.6
|
 |
adeeb alexander
Ranch Hand
Joined: May 29, 2008
Posts: 255
|
|
|
K. He cant do anything. But when i am on home.jsp, it still show as Login(servlet name). I want to see the real path of jsp. Is that not possible???
|
 |
Chetan Dorle
Ranch Hand
Joined: Aug 06, 2009
Posts: 80
|
|
That might be because you have called Servlet Login and in the Login you have forwarded request and response to the home.jsp
In the forward() your browser URL will never change.
Anyone correct me if I am wrong...
Thanks..
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50693
|
|
|
I'm still trying to understand what the problem is. What's the issue? Why is it a problem if the servlet mapping shows in the URL?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Koen Aerts
Ranch Hand
Joined: Feb 07, 2012
Posts: 339
|
|
|
I'm not quite sure I fully understand the issue here... but in your web.xml you can change the url to servlet mapping, so you could change the url for each servlet to something else, if that is what you want.
|
 |
 |
|
|
subject: servlet name in url. how to get rid?
|
|
|