This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes how to deal with this type of ActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to deal with this type of ActionForm" Watch "how to deal with this type of ActionForm" New topic
Author

how to deal with this type of ActionForm

Rajeev Ja
Ranch Hand

Joined: May 06, 2007
Posts: 38
class DepositData extends ActionForm
{
private Patient patient=null;
//contains getters and setters
}
class Patient
{
private String patientId;
}

can any one tell how to deal with action class and how to retrieve
patientId in JSP
Thanks and Regards
Rajeev
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
In the execute method of your action class, you have access to the request and response objects! So you can add whatever you like to them and access them in your JSP!
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
The general form using html tags is property="patient.patientId". This assumes that you have matching get methods: getPatient().getPatientId().

- Brent
 
GeeCON Prague 2014
 
subject: how to deal with this type of ActionForm