java - How to get action url in jsp using Struts 2 -


i have url: http://demo.lendingclub.com/account/summary.action. when visit url, first go authenticate interceptor, in interceptor class, if use:

string uri = req.getrequesturi(); 

it return /account/summary.action

but if use in jsp:

<%     httpservletrequest req = servletactioncontext.getrequest();     string uri = req.getrequesturi(); %> 

it return : /mainapp/pages/account/summary.jsp

why they're different, , how can action url in jsp?

the easiest way current actions url is: <s:url/> if supply namespace , action parameters can make point @ other actions without these parameters defaults current url.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -