Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

JSTL and valuestack problem

Guillaume Carré

2007-03-07


I have a problem using JSTL to manipulate objects from the valuestack.
The behavior is erratic.
I have an action TestAction with the following code:

private String test;
public String execute() {
 test = "toto";  
 return "success";
}
public String getTest() {
 return test;
}
public void setTest(String test) {
 this.test = test;
}

I forward to a jsp, with the following code:

<%@(protected)" %>
struts: <ww:property value="test"/>
<br/>
jstl: ${test}
<ww:debug/>

Sometimes ${test} calls TestAction.getTest(), sometimes it doesn't.
When ${test} output is empty, StrutsRequestWrapper.getAttribute() is
not called.

Thanks.
--
Guillaume Carré

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.