Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2005

Tip: Looking for answers? Try searching our database.

dont show url in address bar

Thread view: 
asianet - 27 Sep 2005 13:33 GMT
How to hide the url from the browser? Should show only one url

I have to make a servlet for controlling all other servlets. The
browser should show only one url. eg:
http://www.mydomain.com/ControllerServlet what I have to do for this?
please advice me... Thanks in advance.
Andrew Thompson - 27 Sep 2005 13:42 GMT
> How to hide the url from the browser?

Do you mean from me, the end user?  How dare you!

If you URL is so damn secret, take it off the net,
otherwise it is MINE.

>..Should show only one url
>
> I have to make a servlet for controlling all other servlets. The
> browser should show only one url. eg:
> http://www.mydomain.com/ControllerServlet what I have to do for this?

You can configure your own browser to remove the
address bar, if you so wish, leave my browser alone.
asianet - 27 Sep 2005 13:49 GMT
hei If you have any solution. Anyway i have to hide the url from the
browser like this

https://www.alawsat.com/servlet/ControllerServlet
Andrew Thompson - 27 Sep 2005 14:10 GMT
> hei If you have any solution. Anyway i have to hide the url from the
> browser like this
>
> https://www.alawsat.com/servlet/ControllerServlet

They use JS to generate (some of) the menus and
(most of the) links.

Not search engine friendly, and not 'JS disabled' friendly
(that is - not 'accessible' to users without JavaScript).

You can decipher how they do this sordid little
act by examining the source of the web page ..and
learning JavaScript.
Thomas Fritsch - 27 Sep 2005 13:59 GMT
> How to hide the url from the browser? Should show only one url
>
> I have to make a servlet for controlling all other servlets. The
> browser should show only one url. eg:
> http://www.mydomain.com/ControllerServlet what I have to do for this?
> please advice me... Thanks in advance.

It is not possible to hide the browser's URL using Java code. But it
should be possible by some JavaScript code embedded in the HTML
generated by your servlet. You should ask your question in news-group
comp.lang.javascript

Signature

"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')

asianet - 27 Sep 2005 14:04 GMT
Thanks for your reply. Can i get more details regarding this?

> > How to hide the url from the browser? Should show only one url
> >
[quoted text clipped - 7 lines]
> generated by your servlet. You should ask your question in news-group
> comp.lang.javascript
Chris Smith - 27 Sep 2005 18:32 GMT
> Thanks for your reply. Can i get more details regarding this?

Yes, by asking in the newsgroup comp.lang.javascript.  Thomas already
said this once.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Thomas Kellerer - 27 Sep 2005 14:15 GMT
> How to hide the url from the browser? Should show only one url
>
> I have to make a servlet for controlling all other servlets. The
> browser should show only one url. eg:
> http://www.mydomain.com/ControllerServlet what I have to do for this?
> please advice me... Thanks in advance.

I'm not entirely sure, but I think if you use a server-side redirect in
your servlet, the browser will only display the original URL.

I think I recall support for this in Struts but I'm not entirely sure.

Thomas
Chris Smith - 27 Sep 2005 18:35 GMT
> I'm not entirely sure, but I think if you use a server-side redirect in
> your servlet, the browser will only display the original URL.
>
> I think I recall support for this in Struts but I'm not entirely sure.

I've noticed that it seems to depend on the exact redirect status code
used.  For example, 307 doesn't generally change the URL displayed in
the browser, but 301 generally does.  None of this is specified, so it
likely depends on the browser and its version as well.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Roedy Green - 27 Sep 2005 20:24 GMT
>How to hide the url from the browser? Should show only one url

It obviously has to be embedded in your HTML somewhere, even if buried
in JavaScript.  You can hide it more deeply by having an Applet go for
it but then you need a signed applet.

Let's say your website is called "Killingbunniesforchrist.com" and you
think this may offend some people, get another domain name and point
it to the same IP.

Just use the IP.

If you are trying to avoid great long URLS confusing the user, use the
TinyUrl technique (not TinyUrl literally) See
http://mindprod.com/jgloss/tinyurl.com

If you are just try to make live difficult for support people trying
to sort out problems, or trying to figure out how to phish without
getting caught, a pox on your project.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Real Gagnon - 28 Sep 2005 03:17 GMT
> How to hide the url from the browser? Should show only one url
> I have to make a servlet for controlling all other servlets. The
> browser should show only one url. eg:
> http://www.mydomain.com/ControllerServlet what I have to do for this?
> please advice me... Thanks in advance.

You need to do a forward from your controller servlet.

Something like

RequestDispatcher dispatcher = request.getRequestDispatcher("myjsp.jsp");
dispatcher.forward(request,response);

See http://www.javapractices.com/Topic181.cjp

Or on the client side, you can use FRAMESET with only one defined FRAME,
the visible URL will always be the FRAMESET page.

See http://www.rgagnon.com/examples/pagefix.html for an example.

Bye.
Signature

Real Gagnon  from  Quebec, Canada
* Looking for Java or PB code examples ? Visit Real's How-to  
* http://www.rgagnon.com/howto.html

HalcyonWild - 28 Sep 2005 16:42 GMT
> How to hide the url from the browser? Should show only one url
>
> I have to make a servlet for controlling all other servlets. The
> browser should show only one url. eg:
> http://www.mydomain.com/ControllerServlet what I have to do for this?
> please advice me... Thanks in advance.

I am not sure, but I think it might be possible using the web.xml
file's url-mapping element. Check if that works.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.