For me is not working. I want something like this: <action name="mainContent" class="com.integrationpath.mengine.webapp.action.ArticleAction" method="list"> <result name="success">/themes/%{application_theme}/pages/production/mainContent.jsp</result> </action>
where "application_theme" is an attribute on Application Context. I want to redirect to a dynamic URL created in runtime based on this variable - and still keep the struts.xml structure. The error that I get now is this: "2010-08-02 10:29:41.718:org.apache.jasper.servlet.JspServlet:WARN: PWC6117: File "D:\projects\mengine\src\main\webapp\themes\\pages\production\mainContent.jsp" not found" Is like this string is not parsed and variables not replaced with their values. Any suggestion? DNewfield wrote: > > On 7/30/10 3:42 AM, colaru wrote: >> Good question. Did you get a response, somehow? >> Is possible to use attributes from request, session or application in >> dynamic URL's? >> I'm interested in this. > > http://struts.apache.org/2.1.8.1/struts2-core/apidocs/org/apache/struts2/dispatcher/StrutsResultSupport.html > > Although now %{} works, too (and makes more sense as ${} usually means > EL, not OGNL). > > -Dale > >> mikeh96 wrote: >>> >>> I would like to do something like this: >>> >>> (e.g. http://foo/view.action?page=help.vm) >>> >>> <action name="view" >>> class="com.opensymphony.xwork2.ActionSupport"> >>> <interceptor-ref name="defaultStack" /> >>> <result >>> type="velocity">/templates/screens/#request['page']</result> >>> </action> >>> >>> I know I can do it if I write my own action with setters/getters for the >>> parameter .. but I was wondering >>> if I can use some ognl syntax or other (e.g. >>> $request.getParameter("page")) >>> >>> thanks >>> >>> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://old.nabble.com/Can-I-access-URL-parameters-within-struts.xml-using-ognl---tp12999801p29322640.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org