• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Want keep same url in the browser address bar

 
Subbarao Kondabala
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • 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
 
Paul Strachan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks for the reply Paul.

Could you please expalin with some example
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic