• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 1.1: Help needed with retreiving values from formbean

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic