Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
Struts
access to the context path w/in Action class
J. Cartwright
Greenhorn
Posts: 16
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello All,
is there a way to access the context path w/in the Action class? I'd like the equivilent of the the
JSP
tag:
<html:rewrite page=""/>
Thanks!
-- john
Merrill Higginson
Ranch Hand
Posts: 4864
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
To get the context path:
String
path = request.getContextPath();
To perform URL rewriting:
String newURL = response.encodeUrl(oldUrl);
Merrill
Consultant,
Sima Solutions
I RELEASE YOU! (for now .... ) Feel free to peruse this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Trouble in hitting servlet via Hyperlink
web application (mvc using jsp and servelet)
embedded js file in doGet
requested resource not found error
Can I access the Application Context from a Struts 2 Action?
More...