struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell" <jmitch...@apache.org>
Subject Re: [Question] Image path - Best way?
Date Sat, 27 Sep 2003 06:36:34 GMT
Are you talking about something like this?

<bean:define id="myImg">
  <bean:message key="my.img"/>
</bean:define>

<html:img page="<%=myImg%>"/>



...where you have something like this in your .properties file

my.img   = /images/logo.gif




--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
770.822.3359
AIM:jmitchtx



----- Original Message ----- 
From: "Rajesh M Vasudevan" <rajesh@neosoftsolutions.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Saturday, September 27, 2003 2:32 AM
Subject: Re: [Question] Image path - Best way?


> Hi guys,
>
> I tried the following, and it seems to work good:
> <img src="<%=request.getContextPath()%>/images/leiste_oben.jpg"
width="430"
> height="80" border="0" alt="">
>
> Is this the right way?  Is there a way to specify it as a Resource? Can
you
> give me a tutorial link of how to do that..
>
> Thanks
> Rajesh
>
> > Hi
> >
> > What is the best way to give image paths in JSP pages?  I see that an
> image
> > path given in a certain way works for .jsp files, but the same path
fails
> > for pages loaded through a .do and vice versa.
> >
> > Is there a standard way that struts instructs by which images can be
> defined
> > in a resource configuration file and refer to them in the jsp pages as
> > resource strings, just like application resources?  OR Is there a way to
> > refer to an image which works well for both .do or .jsp.
> >
> > Please advise..
> >
> > Regards,
> > Rajesh
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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