This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get Parameter from request don't works

 
carlos Muller
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, a simple problem with Struts2 and OGNL, the solution seems obvious but...

I've a JSP, I call it like:

/jsp/wait/Wait.jsp?urlRefresh=Users

The code of Wait.jsp (without simbols gt and lt):

%@ page contentType="text/html; charset=ISO-8859-1" %
%@ taglib prefix="s" uri="/struts-tags" %

1) s:property value="%{#parameters['urlRefresh']}"/
2) s:property value="#parameters['urlRefresh']"/
3) s:property value="#parameters.urlRefresh"/
4) s:property value="%{#request['urlRefresh']}"/
5) s:property value="#request['urlRefresh']"/
6) s:property value="#request.urlRefresh"/

7) %=request.getParameter("urlRefresh")%

Only works and show "Users" the option seven; Why? I don't see another way to do this.

Thanks

 
Joe Ess
Bartender
Pie
Posts: 9265
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Struts 2 documentation says #parameters['foo'] or #parameters.foo should work
I just checked and they both work for me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic