struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lei.java@gmail.com" <lei.j...@gmail.com>
Subject Re: s2: Retrieve current url value
Date Mon, 04 Aug 2008 15:29:32 GMT
Thanks Wes.

Maybe my question is not clear enough. I'd like to find a way to get
value in address bar which is different from the path to the jsp
rendering current page.  Your solutions give us the latter.

e.g., if loginForm.jsp is responsible for rendering page for
login_input.action, ${...requestURI} will display .../loginForm.jsp
but I want to show login_input.action.

Thanks.


On Mon, Aug 4, 2008 at 12:03 AM, Wes Wannemacher <wesw@wantii.com> wrote:
> Depending on how you want it, you can use EL like -
>
> ${request.requestURI}
>
> or, if you are talking OGNL, try -
>
> <s:property
> value="%{#context['com.opensymphony.xwork2.dispatcher.HttpServletRequest'].requestURI}"/>
>
> -Wes
>
> On Sun, 2008-08-03 at 23:42 -0400, lei.java@gmail.com wrote:
>> Hi,
>>
>> Is there a way to get current page's url in struts2?
>>
>> e.g. suppose a login page's url is http://.../<context
>> name>/login_input.action, how to get the url in that page?
>>
>> JavaScript is not allowed.
>>
>> Thanks.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message