• 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

fixed URL

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,

I'd like to ask if there is a way to make the URL fixed. Here is the scenario I'd like to end up with:

URL: http://www.example.com/fixedURL/
User clicks button that would change location to : http://www.example.com/fixedURL/page1.html
page1 is loaded.
Browser URL (address bar) does not change. will remain: http://www.example.com/fixedURL/

is there a way to do this in servlets or javascript ?

Please share some of your thoughts.

Ian
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What, precisely, are you trying to do? You could use Ajax, you could use a forward instead of a redirect, it depends on the usecase.

If the page changes under me I expect there to be a new URL, though.
 
Ian Cabigon
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David.

I just would like to make the URL fixed and clean. as what you have said, like ajax feel. but still, there are page reloading, page transition but virtually no URL change in address box.

If you can think of a possible way to do this either by servlet or javascript, id like to hear from you.

So far i've tried to change the url location on javascript load like:



hehe.. but page reloads!.(

Ian


 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or you can use a frame around your site...
 
Ian Cabigon
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rene.

Yeah! you're right. I was trying to avoid using IFrames but I guess its the way to do it.

Thanks

Ian
 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ian Cabigon wrote:Thanks Rene.

Yeah! you're right. I was trying to avoid using IFrames but I guess its the way to do it.

Thanks

Ian


I'm not saying iFrames - but just a normal HTML frame like this as the default page (index.html ??):
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is easy solution for mention issue.

You can achieve this by submitting request to server using POST type of request.

If you are using links (<a href tags) in code then call JavaScript function to submit the request. <br /> <br /> In general POST type of request won’t be displayed in Browser URL (address bar) <br /> rel="nofollow">
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

abhijit Ohal wrote:In general POST type of request won’t be displayed in Browser URL (address bar)


That is completely and 100% incorrect.
 
reply
    Bookmark Topic Watch Topic
  • New Topic