Re: Mapping images in web.xml

2003-06-13 Thread Bill Barker
I'm not really sure what you are trying to do, but it sounds like:
   servlet-mapping
 servlet-nameMyDefaultServlet/servlet-name
 url-pattern//url-pattern
   /servlet-mapping
   servlet-mapping
 servlet-namedefault/servlet-name
 url-pattern*.gif/url-pattern
   /servlet-mapping
   servlet-mapping
 servlet-namedefault/servlet-name
 url-pattern*.jpg/url-pattern
   /servlet-mapping


would work.

Another suggestion (that I posted awhile back on the list) is code in your 
default-servlet something like:

ServletContext cntx = getServletContext();
URL resource = cntx.getResource(request.getPathInfo());
if(resource != null) {
RequestDispatcher rd = cntx.getNamedDispatcher(default);
rd.forward(request, response);
return;
}
// Your code here.

Donie Kelly [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
   
  Hi all

   

  I've mapped my default servlet in server.xml as / so all requests are mapped to 
that servlet. Is there any standard solution to getting the jsp and images to work 
under this situation?

   

  At the moment they are all getting routed to the default servlet.

   

  If I make the mapping /images in server .xml I can make the images load but I also 
have to map each individual jsp page to the jsp page.

   

  Eg:

   

  servlet

servlet-nameindex.jsp/servlet-name

jsp-file/onm/index.jsp/jsp-file

/servlet

   

  Question: is there any way to get all this to work without all these mappings?

   

  Regards

  Donie

   

   



  **
  This email and any files transmitted with it are confidential and
  intended solely for the use of the individual or entity to whom they
  are addressed. If you have received this email in error please notify
  the sender.

  This footnote also confirms that this email message has been swept by
  MIMEsweeper for the presence of computer viruses.

  **



--


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


Mapping images in web.xml

2003-06-12 Thread Donie Kelly









Hi all



Ive mapped my default servlet in server.xml as / so all requests are
mapped to that servlet. Is there any standard solution to getting the jsp and
images to work under this situation?



At the moment they are all getting routed to the default servlet.



If I make the mapping /images in server .xml I can make the images
load but I also have to map each individual jsp page to the jsp page.



Eg:



servlet

  servlet-nameindex.jsp/servlet-name

  jsp-file/onm/index.jsp/jsp-file

 /servlet



Question: is there any way to get all this to work without all these
mappings?



Regards

Donie









**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

**




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