Link to home
Start Free TrialLog in
Avatar of iabmum
iabmum

asked on

Hiding servlet names in the URL

Hi,

We are developing an application on Tomcat Apache system.

The application is entirely Java servlet and JSP based.

When JSPs call Servlets, those servlets link appear in the URL Address bar. For example, if the JSP is calling say, TestServlet, then the URL address bar displays  
"http://www.aaa.com/Application/servlet/TestServlet".

I wish to keep the link upto
"http://www.aaa.com/Application" only.

I do not want the "servlet/TestServlet" part to be displayed in the URL address bar.

Is this possible? If so, how?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In Servlet environment you can specify in the web.xml different URLs to map to the same or various servlets.. but they must be unique.

CJ
Avatar of iabmum
iabmum

ASKER

COBOLdinosaur and cheekyci,

I am already aware of both the above options. I was wondering if there is anything else apart from these.

Thanks anyway.
How about creating a main processing servlet.

So you will always have http://www.aaa.com/Application but based on what URL params are based.. you can forward to different servlets.

CJ
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

Cd&

IMHO, split btw Cd& and me.

CJ
Avatar of iabmum

ASKER

cheekyci,

I am sorry, but we have already gone thru the your last recommendation about creating a central processing servlet.

Although I'm afraid, I couldn't use the answers above, because I already knew all of them (I was looking for something other than these), I still wish to award the points to the folks who tried to give a reasonably good answer.

Folks let me know, how I can divide the points equally between COBOLdinasour and cheekyci.
A split of the points can be done by a moderator.  Just post a quetion in the customer support TA, letting them know what you want to do.  Be sure to include the link to this question.

Cd&
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
split COBOLdinosaur and cheekycj  -- as per user instructions

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
Thanks, Cd&, for your help here.

This has been finalized today, and monitoring for comments.
Points split.

Points for cheekycj -> https://www.experts-exchange.com/jsp/qShow.jsp?qid=20309851

Moondancer - EE Moderator
Thanks for finalizing it Moon.  :^)

Cd&