You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Zsolt Koppany <zk...@web.de> on 2002/03/31 11:21:06 UTC

taglib and contextPath

Hi,

from a taglib class I have to write links (<A HREF=...</A>) with context 
dependent paths. From a servlet I use request.getContextPath()...
How can I do the same from a taglib class?

-- 
Zsolt Koppany

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: taglib and contextPath

Posted by Jeff Larsen <la...@qec.com>.
HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();

This request object can then be used just like in a servlet.

Jeff

----- Original Message ----- 
From: "Zsolt Koppany" <zk...@web.de>
To: <to...@jakarta.apache.org>
Sent: Sunday, March 31, 2002 3:21 AM
Subject: taglib and contextPath


> Hi,
> 
> from a taglib class I have to write links (<A HREF=...</A>) with context 
> dependent paths. From a servlet I use request.getContextPath()...
> How can I do the same from a taglib class?
> 
> -- 
> Zsolt Koppany
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>