Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts and adding parameter to URL

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have an action class that creates a record(category) in a database. I then get the new primary key for the inserted record(category). I then "redirect" the user to another action class that will search the database for that category using this id and display values associated with it.

My question is how do I append this value to a URL i.e.

/displaycategories.do?categoryid=6

How do I set this value in one action class then redirect the user to another action class and retreive this value from the URL.

thank you
david
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would it be good enough to do request#setAttribute() to pass the argument to the other action?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic