struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepak Kumar" <deepak...@roseindia.net>
Subject RE: s2 : assigning a variable to jsp
Date Fri, 21 Mar 2008 11:11:41 GMT
Hi,

In Struts 2 you can use <s:set tag.

Check the example at
http://www.roseindia.net/struts/struts2/struts2controltags/set-tag.shtml

Thanks


-----Original Message-----
From: niels [mailto:nielssiem@gmail.com]
Sent: Friday, March 21, 2008 4:35 PM
To: user@struts.apache.org
Subject: s2 : assigning a variable to jsp


Hello,

I want to assign a property to a value in jsp.

in struts 1.3 i could do it like:

<bean:define id="assign" name="somename" property="userName"
type="java.lang.String" />

Now I can access the variable via:  <%=assign%>

How can i accomplish this in struts2 for a property:
<s:property value="userName"/>


thanks
in advance.

Niels


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message