Solved

Hiding servlet names in the URL

Posted on 2002-04-06
12
266 Views
Last Modified: 2011-08-18
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.
0
Comment
Question by:iabmum
  • 5
  • 3
  • 2
  • +1
12 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 50 total points
ID: 6922881
Not possible unless you are using frames.

Cd&
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6925135
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
0
 

Author Comment

by:iabmum
ID: 6926860
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.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6927032
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
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7048058
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&

0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7050173
IMHO, split btw Cd& and me.

CJ
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:iabmum
ID: 7060926
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.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7061811
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&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7065738
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&
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7067146
Thanks, Cd&, for your help here.

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

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

Moondancer - EE Moderator
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7067583
Thanks for finalizing it Moon.  :^)

Cd&
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7067601
:)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now