You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by totojack <to...@tin.it> on 2007/06/08 10:07:12 UTC
Cannot access request variable in stack context from jsp
I'm trying to access a variable in stack context form jsp using the struts
tag <s:property>.
The struts debug tag (in struts2) shows me that the key "request" has this
array/map of values:
{javax.servlet.include.servlet_path=/console/Menu.jsp,
struts.request_uri=/console/View.action, struts.view_uri=/console/View.jsp,
.freemarker.Request=freemarker.ext.servlet.HttpRequestHashModel@979091,
struts.valueStack=com.opensymphony.xwork2.util.OgnlValueStack@1fa10f,
.freemarker.RequestParameters=freemarker.ext.servlet.HttpRequestParametersHashModel@c38614,
javax.servlet.include.request_uri=/console/Menu2.jsp,
javax.servlet.include.context_path=/}
but if I try to write the value of struts.view_uri in the jsp using the tag
<s:property value="#request.struts.view_uri"/> nothing appears. I've also
tried to use <s:property value="#request['struts']['view_uri']"/> without
results.
Am i using in a wrong way the ognl syntax?
Thanks.
--
View this message in context: http://www.nabble.com/Cannot-access-request-variable-in-stack-context-from-jsp-tf3888285.html#a11022155
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Cannot access request variable in stack context from jsp
Posted by totojack <to...@tin.it>.
That's right!!!
Thanks Aram
Aram Mkhitaryan wrote:
>
> Hi,
>
> Try <s:property value="#request['struts.view_uri']"/>
>
> Best,
> Aram
> ________________________________
> Aram Mkhitaryan
>
> 52, 25 Lvovyan, Yerevan 375000, Armenia
>
> Mobile: +374 91 518456
> E-mail: aram.mkhitaryan@googlemail.com
>
>
--
View this message in context: http://www.nabble.com/Cannot-access-request-variable-in-stack-context-from-jsp-tf3888285.html#a11023805
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Cannot access request variable in stack context from jsp
Posted by Aram Mkhitaryan <ar...@googlemail.com>.
Hi,
Try <s:property value="#request['struts.view_uri']"/>
Best,
Aram
________________________________
Aram Mkhitaryan
52, 25 Lvovyan, Yerevan 375000, Armenia
Mobile: +374 91 518456
E-mail: aram.mkhitaryan@googlemail.com