• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to hide the extension in the web browser address bar url?

 
Kumaran Sowrirajan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends
Can you tell me how to hide the extension like .jsp and querystring in the address bar of the web browser.
I am having one button,if i click the button i am calling one jsp file called first.jsp.
In the address bar it shown as
http://servername:80/first.jsp
but i dont want the extension.also sometimes i pass the query string also in the url.i dont want to display all the values passed through the query string.Can you tell me how to do this one?
i dont want to use frames.
Thanks and Appreciated
Regards
Kumaran.S
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can hide the data by using the POST rather than the GET method for sending data in HTTP.
You can hide the file name by using the Model-View-Controller (or Model 2) architecture with a global controller. That way the same name is always shown but the actual page used to display the data (the 'view') gets decided on the server side.
Dave.
 
Tim Holloway
Bartender
Posts: 18417
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can hide the query string by using the POST method, but the "extension" can't be hidden - it's an integral part of the MIME-decoding process. A web server may be called in a single page request to return images (GIF. JPG, PNG), HTML, run a JSP or servlet or ASP or CGI (etc, etc, etc).
Technically, I suppose you COULD create a web app where the processing type for each request and subrequest was deduced by setting up the server to make that decision by something other than dissecting the URL, but it would be a lot of work, would probably be difficult to maintain, and the benefits are questionable.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!