• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Accessing requestURL using OGNL

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was Googling around looking how to get the requestURL using the ognl syntax #request. I found this post:

http://old.nabble.com/struts-result-going-to-a-current-page-td15509367.html

The way I am doing it is:



The above solution is ugly. Is there a more elegant solution (perhaps something has changed with Struts in the few years that the post was made...) ? Is it possible to use #request.requestURL, or something similar? I tried a few by trial and error and was unable to find a solution on the web.

Thanks for your time. Kind regards,

James
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you use the <s:debug/> tag you can see what's in the value stack and see if anything's changed (I've been out of the loop for about a year). Another trivial option would be to just create an interceptor that puts it on the stack--that's all any new S2 code would do anyway. Or get it in the action.
 
reply
    Bookmark Topic Watch Topic
  • New Topic