You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by otisg <ot...@ureach.com> on 2004/01/08 17:04:31 UTC
Getting web app context?
Hello,
I am trying to do something like this in a JSP:
<a href="
<c:url value="Foo.do">
<c:param name="_doneURI" value="/MYAPP/Action.do"/>
</c:url>"></a>
That /MYAPP part is hard-coded, and I would like ot replace it
with a piece of JSTL that would always put the name of the
current web application context there.
Is there a way to do this in JSTL?
I am looking at the JSTL reference (Appendix from JSTL in
Action), but see nothing that will do that.... but I suspect
that I'm just not seeing it, and that there is a nice, elegant
way of doing this using JSTL.
I've tried using the following in place of MYAPP above:
<c:url value="Action.do"/>, but that didn't work :(
I actually couldn't even get this to work:
<c:out value="<c:url value="Action.do"/>"/>
Thanks,
Otis
________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: Getting web app context?
Posted by Kris Schneider <kr...@dotech.com>.
pageContext.request.contextPath
Quoting otisg <ot...@ureach.com>:
> Hello,
>
> I am trying to do something like this in a JSP:
> <a href="
> <c:url value="Foo.do">
> <c:param name="_doneURI" value="/MYAPP/Action.do"/>
> </c:url>"></a>
>
> That /MYAPP part is hard-coded, and I would like ot replace it
> with a piece of JSTL that would always put the name of the
> current web application context there.
>
> Is there a way to do this in JSTL?
>
> I am looking at the JSTL reference (Appendix from JSTL in
> Action), but see nothing that will do that.... but I suspect
> that I'm just not seeing it, and that there is a nice, elegant
> way of doing this using JSTL.
>
> I've tried using the following in place of MYAPP above:
>
> <c:url value="Action.do"/>, but that didn't work :(
>
> I actually couldn't even get this to work:
>
> <c:out value="<c:url value="Action.do"/>"/>
>
>
> Thanks,
> Otis
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org