You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Les Dunaway <le...@mindspring.com> on 2003/04/03 15:28:20 UTC

Problems loading images - tomcat 4.1.18 / struts 1.1-rc1

Folks,

I am loosing what little mind I had:

I've got 

<html:base/>

It renders 

<base href="http://localhost:8080/MyApp/WEB-INF/pages/as_home.jsp">

and 
<html:img page="/WEB-INF/images/header.jpg" alt="Header"/>

It renders 

<img src="/MyApp/WEB-INF/images/header.jpg" alt="Header">


All of which looks like I'd expect. However, I get no images!!!! - just
the alt string.

I have tried hard-coding the path in an html <img tag with the same
result.

I got one suggestion that permissions on the image dir could be a
problem - I set them to 0777 with  chown tomcat4:tomcat4.


Does anyone have a clue? 'cause I SURE don't.

Les


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


Re: Problems loading images - tomcat 4.1.18 / struts 1.1-rc1

Posted by James Mitchell <jm...@apache.org>.
The servlet container cannot serve content from under /WEB-INF.

Put your static content (images, css, js, etc) outside of the
/WEB-INF....like /images and /css.


On Thu, 2003-04-03 at 08:28, Les Dunaway wrote:
> Folks,
> 
> I am loosing what little mind I had:
> 
> I've got 
> 
> <html:base/>
> 
> It renders 
> 
> <base href="http://localhost:8080/MyApp/WEB-INF/pages/as_home.jsp">
> 
> and 
> <html:img page="/WEB-INF/images/header.jpg" alt="Header"/>
> 
> It renders 
> 
> <img src="/MyApp/WEB-INF/images/header.jpg" alt="Header">
> 
> 
> All of which looks like I'd expect. However, I get no images!!!! - just
> the alt string.
> 
> I have tried hard-coding the path in an html <img tag with the same
> result.
> 
> I got one suggestion that permissions on the image dir could be a
> problem - I set them to 0777 with  chown tomcat4:tomcat4.
> 
> 
> Does anyone have a clue? 'cause I SURE don't.
> 
> Les
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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


Re: Problems loading images - tomcat 4.1.18 / struts 1.1-rc1

Posted by Gemes Tibor <ti...@i-trade.hu>.
Les Dunaway írta:

><html:img page="/WEB-INF/images/header.jpg" alt="Header"/>
>
>It renders 
>
><img src="/MyApp/WEB-INF/images/header.jpg" alt="Header">
>  
>
You cannot store your images in WEB-INF. there can be jsps to which
you forward, but no resource directly referenced from browser.

Hth,

Tib




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