K.C.
Martin van Dijken wrote:
Hey KC,
Just checked the 1.0 spec and it doesn't look like it. Also, the other jakarta taglibs don't seem to support this. It is of course possible to do this yourself using the c:out tag. What you described can be rewritten to:
<c: out value="${request.scheme+request.serverName+request.serverPort+request.contextPath}"/><c:url value="/main.jsp"/>
Granted it isn't a very elegant solution, but if you have some experience in writing tags yourself you could of course write a tag like this yourself. If you stick to the design regulations for jakarta taglibs and post it to the taglibs dev list, they'll probably accept your help with a lot of gratitude:)
Grtz,
Martin
-----Original Message----- From: K.C. Baltz [mailto:[EMAIL PROTECTED] Sent: woensdag 1 oktober 2003 6:30 To: Tag Libraries Users List Subject: Is there a tag to create an absolute URL from a relative one?
Is there anyway to make the <c:url> tag generate an absolute URL, given a relative URI? Or perhaps another tag?
For example, if I had a file main.jsp in the root of my webapp, I'd like the following mock tag:
<c:url value="/main.jsp" absolute="true" />
to produce the following result
http://myserver:port/servletContext/main.jsp
I can do this by hand using request.get[Scheme|ServerName|ServerPort|ContextPath](), so it seems like a tag should be able to do it.
K.C.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
