• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Want keep same url in the browser address bar

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

We are using struts1.2 and my requirement is after user login I want to keep the same url in browser address bar, even though the user clicks on different actions.

How can I acheive this?


Can any body help me regarding this.

Thanks and Regards,
Subbarao
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

The browser always displays the address of the last request - AFAIK you can't change that.

One option could be to redirect after each action to your "same url"; this action would only be responsible for "rendering" your page. With this approach all your forms and data need to be defined at session scope.

so, in each action you'd do something like:
in your "same url" render action:
Also if you're using tiles, utilising page controller can sometimes be useful (e.g. call the database to retrieve a list used by the page - storing it on the request)

If you can allow 1 Url per form with multiple methods, try the EventActionDispatcher.
 
Subbarao Kondabala
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply Paul.

Could you please expalin with some example
 
Sheriff
Posts: 67618
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

Subbarao Kondabala wrote:We are using struts1.2 and my requirement is after user login I want to keep the same url in browser address bar, even though the user clicks on different actions.


Why would you want to do that?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic