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!

How to assign bean value to a local variable in JSP using struts.

843838Nov 14 2005 — edited Oct 5 2007
Hi everybody!

I've a problem that puzzled me on how to assign a bean value to a local variable like String in JSP using struts.

we can have someting like this to display the value
<bean:write name="detailService" property="status" />
or
<bean:define id="theStatus" name="detailService" property="status"/>
	This is country: <%=theStatus%>
but an error occured when I tried like this:
String currentStatus = "<bean:define id="theStatus" name="detailService" property="status"/>";
or
String currentStatus = "<bean:write name="detailService" property="status" />";
Is there a way to do this?.....
Any help pretty much appreciated
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2007
Added on Nov 14 2005
2 comments
1,537 views