Oh, sorry, you said WITHOUT using scriptlet
code. Well, since you’re using Struts (by the looks of your URL),
you can use the html tags to print out your hrefs. It will take care of
that for you. If you want to do it without Struts, the “official”
or “standard” way to do it is to use JSTL.
-----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!