aspose file tools
The moose likes Struts and the fly likes How to get object from Valuestack and pass it to another action? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "How to get object from Valuestack and pass it to another action?" Watch "How to get object from Valuestack and pass it to another action?" New topic
Author

How to get object from Valuestack and pass it to another action?

Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
I have an employee object on ValueStack and I know it's there because in menu.jsp



is displaying properly, so how do I pass this employee to another action?

I have



and confuse on what to put for value attribute, anything in "" will be interpreted as String, and I get noSuchMethod exception

setEmployee(Ljava.lang.String) I have setEmploye(Employee employee) instead. I didn't think I need a EmployeeTypeConverter class because I want to take the current Employee object from ValueStack not instantiate another Employee object.

any suggestion is appreciated
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You can't pass "an object" as a URL parameter--the only thing HTTP passes in URLs or form submissions is strings.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to get object from Valuestack and pass it to another action?
 
Similar Threads
Struts2: s:param not adding parameters to s:url
[Struts2] Setting up preselection in s:select tag
how to push object onto Valuestack for OGNL access
property tag problem
how to set javascript varibale in <s:url><s:param> value attribute