File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts2 text boxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 text boxes" Watch "Struts2 text boxes" New topic

Struts2 text boxes

Rajaprabhu Aravindasamy

Joined: Dec 26, 2011
Posts: 25
Hello everyone,
I'm new to the Struts2 framework.. and i have been learning it slowly. and i'm having one doubt regarding text boxes in Struts2.
will it automatically fetches values from the bean which is having variable name as same as the field name in the text boxes..?

<action name=temp class=test>
//action temp called after submitting a form
test contains variables var1 & var2
myjsp contains <s:textfield name=var1 ...>
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Yes, ognl will do that for you.

ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Rajaprabhu Aravindasamy

Joined: Dec 26, 2011
Posts: 25
Thank you very much. My doubts have been cleared..!
I agree. Here's the link:
subject: Struts2 text boxes
It's not a secret anymore!