But
<%
  // declare or construct your variable...
  String title="My page";
  // set the variable in the page context under the variable name "title"
  pageContext.setAttribute("title",title);
%>
<s:hidden name="foo" value='${title}' />

This return the same error. Could you write me here any simple working
example?





Musachy Barroso wrote:
> 
> http://answers.google.com/answers/threadview?id=371241
> 
> musachy
> 
> On Tue, Mar 11, 2008 at 1:39 PM, bugs_ <[EMAIL PROTECTED]> wrote:
>>
>>  I need rewrite jsp page from Struts 1 to Struts 2.
>>
>>  In Strust 1 is in the page something like this:
>>  <% String variable = ... %>
>>  <html:hidden property="foo" value="<%= variable %>"/>
>>
>>  I tried to rewrite it in Struts 2:
>>  <% String variable = ... %>
>>  <s:hidden name="foo" value="<%= variable %>" />
>>  but this doesn't work. It return an error message: "According to TLD or
>>  attribute directive in tag file, attribute value does not accept any
>>  expressions"
>>
>>  I really don't know how to access variable in a Struts 2 tag?
>>
>>  I tried to read Struts 2 documentation, but I didn't find solution.
>>  --
>>  View this message in context:
>> http://www.nabble.com/How-to-write-variable-in-a-Struts-2-tag--tp15981156p15981156.html
>>  Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-write-variable-in-a-Struts-2-tag--tp15981156p15994418.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to