• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hide absolute path on the url

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont know on which topic shuld i put this query.so i am posting here hope u will put this in the right slot..
anyways what i want to do is as follows...
I have a website made in jsp only..my problem is that i want to hide the absolute path of my jsp file (which is being accessed by the user) on the address bar bcoz i want to hide some parameters which i am passing to various jsp file..
for eg. i have a url http://www.mydomain.com:8080/myapplication/myapp_folder/filename.jsp?id=something1&name=something2
I want to hide this absolute path and :8080 also. so that my url does not display my application information.
I hope I have made my point clear enough...
Thank You
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
first.. that immpossble. (hide ur absolute URL)
an easy method.
make a index.jsp that is have frameset.
ex)
index.jsp
<html>
<head>
<title>Test Index.jsp For Hide URL</title>
</head>
<frameset rows="100%,*" frameborder="NO" border="0" framespacing="0">
<frame src="index2.jsp" name="mainFrame" scrolling="AUTO" noresize marginwidth="0" marginheight="0">
<frame src="blank.jsp" name="dummy" marginwidth="0" marginheight="0">
</frameset>
</html>
i say... make frame...
 
varun bihani
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But I have heard that its not a good idea to use frames...
Is that true??
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is indeed true.
In fact, frames are now no longer a part of the official HTML specification and haven't been since about 2001. They're only still supported in an addendum for backwards compatibility.
A better idea would be to create a servlet that determines from the request (which should be a POST request) which JSP to use and then use HTTP forward to send the request to that JSP.
That way all your JSPs will seem to have the address of that servlet without any parameters at all.
 
varun bihani
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could You please explain a bit more...
How to make that servlet and implement...

Originally posted by Jeroen Wenting:
That is indeed true.
In fact, frames are now no longer a part of the official HTML specification and haven't been since about 2001. They're only still supported in an addendum for backwards compatibility.
A better idea would be to create a servlet that determines from the request (which should be a POST request) which JSP to use and then use HTTP forward to send the request to that JSP.
That way all your JSPs will seem to have the address of that servlet without any parameters at all.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic