I believe Hendrik is writing a custom JSF renderer class, and wants to
know how to generate the appropriate HTML output.

This is done by quite a few components. I believe the correct way to do
this is via method
  facesContext.getApplication().getViewHandler().getResourceUrl(...)

See the javadoc for ViewHandler.getResourceUrl for details.

Regards,

Simon

On Tue, 2006-01-24 at 21:42 +0100, Thomas Gaudin wrote:
> Maybe you can try 
> src="#{facesContext.externalContext.requestContextPath}/images/mytarget.png"
> 
> Hope it helps,
> 
> Thomas
> 
> Hendrik Neumann a écrit :
> > Hi List,
> >
> > I'm currently developing a JSF-components which renders SVG-images:
> >
> >     <svg:rasterizer         src="mySrc.svg"
> >                                             target="mytarget.png"
> >                                             type="PNG"
> >                                             styleClass="myCssClass"
> >                                             style="background-color:gray;"
> >                                             width="50"
> >                                             height="100"
> >                                             alt="alt text"
> >                                             allowZoom="true"
> >                                             allowVerticalResize="true"
> >                                             allowHorizontalResize="true"
> >     />
> >
> > But of course I want to use relative paths for src and target. So I
> > need to add the full path to the webapplication to src and target. But
> > how can I obtain this information?
> >
> > --
> > Mit freundlichen Grüßen / Greetings,
> > Hendrik Neumann; Ruhr-University of Bochum
> > ---------------------------------------------------------------------------------------
> > Wanadoo vous informe que cet  e-mail a ete controle par l'anti-virus mail. 
> > Aucun virus connu a ce jour par nos services n'a ete detecte.
> >
> >
> >
> >
> >
> >   
> 
> 

Reply via email to