File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes hide absolute path on the url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "hide absolute path on the url" Watch "hide absolute path on the url" New topic
Author

hide absolute path on the url

varun bihani
Ranch Hand

Joined: Aug 11, 2003
Posts: 96
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


<a href="http://www.galaxyweblinks.com" target="_blank" rel="nofollow">www.galaxyweblinks.com</a><br /><a href="http://www.freechatcode.com" target="_blank" rel="nofollow">www.freechatcode.com</a><br /><a href="http://www.onlinefamilytreemaker.com" target="_blank" rel="nofollow">www.onlinefamilytreemaker.com</a>
jhong jaewon
Greenhorn

Joined: Jan 19, 2004
Posts: 3
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

Joined: Aug 11, 2003
Posts: 96
But I have heard that its not a good idea to use frames...
Is that true??
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
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.


42
varun bihani
Ranch Hand

Joined: Aug 11, 2003
Posts: 96
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hide absolute path on the url