Thomas,

in my decorators I typically take the current context path from the
PageContext like this:

        PageContext pc = getPageContext();
        HttpServletRequest request = (HttpServletRequest)pc.getRequest();
        String contextPath = request.getContextPath();

Martin

> -----Ursprüngliche Nachricht-----
> Von: Thomas Hamacher [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 10. November 2005 16:49
> An: Struts Users Mailing List
> Betreff: Struts <html:rewrite> and displaytag
> 
> 
> Hi,
> 
> as we had a few display:*-tag questions in here in the last 
> days I wonder if 
> anyone found a solution to this problem:
> 
> I´m using the display:* together with Struts 1.2.7 and this 
> works quite good 
> so far. But I´m experiencing the following problem now:
> 
> I´m using a wrapper/decorator to create an image together 
> with a link. But in 
> my wrapper-method I can only create a link like this:
> 
> return "<a href=\"/context/html/myPage.do\" ...... />
> 
> Unfortunately the reference to "myPage" is not relative, so I 
> have to use a 
> path. As I don´t want to hardcode this path in my 
> wrapper-class, but use it 
> through my struts-config I´d like to use the relevant 
> struts-tag. In this 
> case this would be <html:rewrite action="/myPage" /> which 
> returns me the 
> correct path regarding the contextURL etc. Unfortunately this 
> <html:rewrite> 
> will not be executed if I simply return the struts-tags in my 
> wrapper-class. 
> Is there a solution to this problem?
> 
> Same thing to this display:*-tag
> <display:column valign="top" property="name" ..... 
> href="/context/html/myPage.do" />
> 
> The href="..." should be replaced by <html:rewrite>. But the 
> struts-tags are 
> not allowed within the <display:table>. Does this have 
> anything todo with EL? 
> Does anyone has an example for this?
> 
> Thank you very much for your help
> Thomas
> 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to