Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts ActionForm variable values in JSP

843840Sep 26 2007 — edited Sep 28 2007
I've tried to get variable values from a Struts ActionForm. I know that I can use Struts's bean tags, but can't figure out correct syntax or may there's some thing else to discover.

I'm trying something like:

...
<bean:define id="atr" name="MyActionForm" property="attribute"/></address>

<p><%=atr%></p>
...

And my struts-config look like:

...
<form-bean name="MyActionForm" type="sth.MyActionForm"/>
...

And the ActionForm is like:

...
private String attribute;
...
public String getAttribute() { ... }
public void setAttribute(String attribute) {...}
...

What may be wrong?

Edited by: aproppon on Sep 26, 2007 9:46 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2007
Added on Sep 26 2007
5 comments
308 views