File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Data Transmission from a JSP Page to the Struts Action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Data Transmission from a JSP Page to the Struts Action class" Watch "Data Transmission from a JSP Page to the Struts Action class" New topic
Author

Data Transmission from a JSP Page to the Struts Action class

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234


Hi , i am having a query of Data Transmission from a JSP Page to the Struts Action class ??

How the Data from the JSP Page will be automatically set to the Setter Methods of an Action class ??

Thanks.


Save India From Corruption - Anna Hazare.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Via type conversion.

I'm not sure what you're asking.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

[quote I'm not sure what you're asking.




The question i am asking is that , how the username in the <s:textfield name="userName" /> is mapped to userName in HelloWorld Action class ??

nobeltr ozgur
Greenhorn

Joined: Sep 20, 2009
Posts: 14
All the form properties is stored on the ValueStack.
Action class contains the form properties and the corresponding getter and setter methods
we set the the values of forms in action
The name attribute of the UI tag is the one which links the property on the ValueStack.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thank You
 
Consider Paul's rocket mass heater.
 
subject: Data Transmission from a JSP Page to the Struts Action class