On the request object, there’s a
property called “contextPath”. Use that.
-----Original Message-----
From: Sling Shot
[mailto:slingshaut@xxxxxxxxx]
Sent: Thursday, July 22, 2004 1:06
PM
To: users@xxxxxxxxxx
Subject: [cinjug-users] value for
href in webapps
What is the recommended way to write values for the
href attribute in jsps?
We're currently using something like"
but I'd like the href value to be independent of the
webapp name ("mywebapp"
e.g. Like the way we specify the values in the
<jsp:forward ..> action,
where the webapp context root is automatically chosen
for you.
So in the above example I would like to write the href
as:
where MACRO is some code that automatically chooses
the webapp
context root for me at runtime.
Is there some way this can be done (prefereably w/o
using scriptlet code)
Do you Yahoo!?
Vote for
the stars of Yahoo!'s next ad campaign!