Subject: Re: <html:img> and servlet context - doesn't get it
From: "Matt Raible" <[EMAIL PROTECTED]>
 ===
Worked like a charm - thanks Max!

"Max Cooper" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Use the page attribute instead of src to have the context path prepended:
>
> <html:img page="/images/logoOnpoint.gif">
>
> -Max
>
> ----- Original Message -----
> From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 26, 2002 11:10 AM
> Subject: <html:img> and servlet context - doesn't get it
>
>
> > Subject: <html:img> and servlet context - doesn't get it
> > From: "Matt Raible" <[EMAIL PROTECTED]>
> >  ===
> > I am having a problem in my webapp.
> >
> > I setup the mapping to my images directory in my struts-config.xml as
> > follows:
> >
> > <forward name="images" path="/images"/>
> >
> > This works great, as I then write my images as follows:
> >
> >     <img src="<html:rewrite forward='images'/>/logoOnpoint.gif"
> > class="logo"/>
> >
> > The <html:rewrite> adds {context}/images to the src attribute.
> >
> > However, when I hit my welcome page for the first time, the src is
> resolved
> > as:
> >
> >
>
/onpoint/images;jsessionid=1514B06821426587237517B89374C181/logoOnpoint.gif
> >
> > I attempted to fix this by using the html:img tag
> >
> > <html:img src="/images/logoOnpoint.gif"> thinking that this would
resolve
> to
> > the proper src with the context pre-pended.  No Dice.
> >
> > Any ideas?
> >
> > I took out the html:base tag since it was resolving to my tiles
template,
> > rather than the actual request URL.
> >
> > Thanks,
> >
> > Matt
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to