aspose file tools*
The moose likes Struts and the fly likes Struts and adding parameter to URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts and adding parameter to URL" Watch "Struts and adding parameter to URL" New topic
Author

Struts and adding parameter to URL

david allen
Ranch Hand

Joined: Sep 27, 2002
Posts: 185
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

Joined: Jan 23, 2002
Posts: 11962
    
    5
Would it be good enough to do request#setAttribute() to pass the argument to the other action?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts and adding parameter to URL