try <s:property value="#request.key" />
2010/10/7 <lunch...@yahoo.co.jp> > Hi, > > When I set a value in my interceptor,I could not get it in a jsp. > How to do that? > > > ### my interceptor > public class HogeIntercepter extends AbstractInterceptor { > > @Override > public String intercept(ActionInvocation invocation) throws Exception { > HttpServletRequest request = ServletActionContext.getRequest(); > > request.setAttribute("key", "aaa"); > > return invocation.invoke(); > } > } > > ### jsp > <c:out value="${key}"/> -> it's return 0. > <s:property value="key" /> -> it's return 0. > <% out.println(request.getAttribute("key")); %> -> return "aaa" > > > > FYI. > I also refered the following the URL > > http://stackoverflow.com/questions/1804266/struts2-understanding-the-value-stack > but I could not get it in a jsp. > > public String intercept(ActionInvocation invocation) throws Exception { > > Map<String, Object> map= new HashMap<String, Object>(); > map.put("key", "aaa"); > invocation.getStack().push(map); > > return invocation.invoke(); > > } > Thanks. > %> > > -------------------------------------- > Learn more about breast cancer - Pink Ribbon Campaign 2010 > http://yj.pn/JAy9L7 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >