wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts 1.1: Help needed with retreiving values from formbean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.1: Help needed with retreiving values from formbean" Watch "Struts 1.1: Help needed with retreiving values from formbean" New topic
Author

Struts 1.1: Help needed with retreiving values from formbean

lavi mendonca
Ranch Hand

Joined: Apr 24, 2002
Posts: 53
Hi,

I am using struts 1.1. My ActionForm (formbean) is defined in struts-config in session scope (in the action tag, name="myform" set to session scope). Among other fields on the form, my formbean has a field/ property with getter and setter for a String called usrAction.

Now, in my JSP file, I want to retrieve the value of this usrAction property from the formbean and pass it as a parameter to a static method of an Util class. So, that i may then use this to print to the user.

Some thing like the below:

1. String action = retrieve the value of usrAction from the formbean.
2. String fName = SomeUtil.getFName(action).
3. <%= fName %>

How can i perform the step 1 above purely in struts.

Any help would be greatly appreciated.

Thanks in advance.
lavi mendonca
Ranch Hand

Joined: Apr 24, 2002
Posts: 53
Hi - I am wondering why there has been no response to this post.

I know that with pure JSP, i can achieve the 3 steps outlined in my last post. Since i did not find any struts mechanism to achieve step 1, i thought of putting this up the post in case i have missed it in my study.

Please let me know if it is possible at all to achieve step 1 in struts. i.e assign a value of a form bean field to a variable so that i can then invoke my utility method passing this variable as a parameter.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 1.1: Help needed with retreiving values from formbean