struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter.Kel...@meteoswiss.ch
Subject RE: dynamic paths to images
Date Tue, 10 Jun 2003 06:13:07 GMT
Hm, ok. Thanks.


-----Original Message-----
From: Max Cooper [mailto:max@maxcooper.com] 
Sent: Freitag, 6. Juni 2003 01:35
To: Struts Users Mailing List
Subject: Re: dynamic paths to images


Write a custom tag that does it for you.

<myapp:img name="imageProvider" property="path" />

-Max

----- Original Message ----- 
From: <Peter.Keller@meteoswiss.ch>
To: <struts-user@jakarta.apache.org>
Sent: Thursday, June 05, 2003 7:39 AM
Subject: dynamic paths to images


I have to generate dynamic paths to images (depending on the date). My jsp scriplet looks
like this:

<bean:define id="imagePath" name="imageProvider" property="path"/> <img src='<%=request.getContextPath()%><bean:write
name="imagePath"/>'>

where 'imageProvider' is an attribute in session scope with a property 'path'.

It works, however it is not very elegant. Who knows a nicer solution? Thanks.

Peter





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message