Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing requestURL using OGNL

 
James Gadbury
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • 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
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic