• Post Reply Bookmark Topic Watch Topic
  • New Topic

hiding file names in URL  RSS feed

 
Prasad Darsi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to know how to hide the file names in the address bar of the browser so that user cannot know the exact name of the jsp page. I am using Tomcat as the servlet container.

(i.e., no matter how many pages the user visits, the address bar should show some constant address.)

We have to do this using a servlet or any other method available ?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Prasad" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy. User names cannot be obviously fake and must constist of a first name and a last name.

You can change your user name here.

What you want is possible if you have a controller servlet that every page calls. The controller servlet reads request parameters and forwards the request to the appropriate JSP page. If every request is a POST, you don't even have to put any parameters in the URL.

Thanks! and welcome to the JavaRanch!
 
kalyan kumarG
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
create only one servlet that receives all the requests. Here the servlet acts like a controller. Just it receives the requests and forwards to the JSPs.
<br/>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!