You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Billy Ng <kw...@earthlink.net> on 2002/10/24 06:21:44 UTC

Image path question

I am building an app that has lots of <TD> contains the backgrpound images.  In the <html:img> tag I can use the page attribute without defining the app name, but the in the <TD>'s background attribute, I need to add the app name in the path like "/myApp/img/imgae.gif".  If I don't want to write the custom tag to generate the <TD> tag, what other option do I have?  In additional, this program will be the only one app that will on the intranet.  If I can map the http://localhost:8080/myApp to http://localhost/, it may solve the problem.  Can I do it in Struts? or this will be the Tomcat or Apache thing?

Thanks!

Billy Ng

RE: Image path question

Posted by James Mitchell <jm...@telocity.com>.
This is really a Tomcat-Users question, but since you stopped by....

(see below)

> -----Original Message-----
> From: Billy Ng [mailto:kwokng@earthlink.net]
> Sent: Thursday, October 24, 2002 12:22 AM
> To: Struts Users Mailing List
> Subject: Image path question
>
>
> I am building an app that has lots of <TD> contains the
> backgrpound images.  In the <html:img> tag I can use the page
> attribute without defining the app name, but the in the <TD>'s
> background attribute, I need to add the app name in the path like
> "/myApp/img/imgae.gif".
> If I don't want to write the custom tag
> to generate the <TD> tag, what other option do I have?


you mean like this?
<td background="<html:rewrite...

> In additional, this program will be the only one app that will on
> the intranet.
> If I can map the http://localhost:8080/myApp to http://localhost/,
> it may solve the problem.

No that won't solve the problem, but to do it name your .war file ROOT.war
(you know, like the one that ships with Tomcat ;)


> Can I do it in Struts? or this will be the Tomcat or Apache thing?

Yes, and yes

>
> Thanks!
>
> Billy Ng
>


James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former."
- Albert Einstein (1879-1955)



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>