Do you have any logs of what's going on? Also, make sure the pages are using the <c:url /> tag (or equivalent), as the image paths need to be relative to the url that the client browser see - should be able to hard code the path to be /ntrr/images/whatever.jpg

To check for bad paths first view page source from your browser, then you can get the image urls and see if they map to the correct path. There are also some nice tools that you can run to see what's going on, for instance the "Live Headers" extension for Firefox, or Ethereal for a more general solution

William BC Crandall wrote:

Hello,

I'm starting a new project, using a FrontController servlet
(http://java.sun.com/j2ee/patterns/FrontController.html),
and am unable to access image files. My understanding is that each <img> invokes another call to the server/servlet, which, due to the mapping in web.xml,
is channeled through the controller servlet, which rejects
the call because it does not point to a sub-servlet.

How can I access images in webapps/ntrr/images/ ?

My web.xml:
<web-app>

 <servlet>
   <servlet-name>
     controller
   </servlet-name>
   <servlet-class>
     org.ntrr.core.ControlServlet
   </servlet-class>
 </servlet>

 <servlet-mapping>
   <servlet-name>
     controller
   </servlet-name>
   <url-pattern>
     /*
   </url-pattern>
 </servlet-mapping>
</web-app>

I have tried, without success, adding:
   <init-param>
     <param-name>imageUrl</param-name>
     <param-value>http://localhost:8080/ntrr/images/</param-value>
   </init-param>

The files in webapps/ntrr/images/ ARE accessible from
webapps/ntrr/css/ntrr.css, when called as background page images, for example.

Any suggestions welcomed.
Thanks,

-BC

William BC Crandall
bc.crandall [around] earthlink.net


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


--
   Robert r. Sanders
   Chief Technologist
   iPOV
   (334) 821-5412
   www.ipov.net

Reply via email to