If you are using tomcat4, you can use a filter to help with this. you can map a directory to your servlet <url-pattern>/myservlet/*</urlPattern>
then you can create a filter that maps '/*' and checks the requested URL itself to see if it should be passed on(call doChain()) or forwarded to /servlet/ to process it within the servlet(forward() without calling doChain()). Another alternative is you can map file types to a servlet <url-pattern>*.html</urlPattern> This allows you to leave images and jsp files alone. Charlie > -----Original Message----- > From: Donie Kelly [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 21, 2002 5:23 AM > To: 'Tomcat Users List' > Subject: Need root mapping for servlet but want to be able to > retrieve ima ges... pls help > > > Hi all > > I'm asking this question again because I still don't have a working > solution. My servlet is mapped to / as shown below. However, > when I use jsp > pages the images in the page are invoking a request from this servlet > instead of getting the image. Anybody got a solution for this? > > My images are in ../context/images > Thanks > Donie > > > <servlet> > <servlet-name>myservlet</servlet-name> > <display-name>myservlet</display-name> > <servlet-class>com.company.mm.y.myservlet</servlet-class> > <load-on-startup>50</load-on-startup> > </servlet> > > <servlet-mapping> > <servlet-name>myservlet</servlet-name> > <url-pattern>/</url-pattern> > </servlet-mapping> > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>