tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Biciunas" <mark.biciu...@agorex.com>
Subject Re: images not appearing
Date Wed, 09 Jul 2003 18:17:29 GMT
Hi,

Your solution is exactly what was needed and it is the direction I ended up
going in overnight with the tender assisstance Bill Barker.  There are a
couple of tricks to getting it working correctly so I am posting a seperate
email to the group outlining what I have learned (it is definately not
intuitive).

BTW, the problem you ran into in your solution probably has to do with the
first "/" on <url-pattern>/images/*</url-pattern>.  I haven't checked it
yet, but <url-pattern>images/*</url-pattern> might work better.

Thanks to everyone for their great help!

Mark Biciunas
mark.biciunas@agorex.com
----- Original Message -----
From: "Stefan Radzom" <sradzom@web.de>
To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
Sent: Wednesday, July 09, 2003 10:25 AM
Subject: RE: images not appearing


> >
> > I can now access the servlet successfully using the url
> > "http://192.168.1.3/test/hello".  The problem is, I need to be able to
> > access it without supplying any path information (ie:
> > http://192.168.1.3).
> >
> > So the question now is, how can server.xml and web.xml be
> > configured to
> > allow access without any paths?  BTW, this does work in
> > earlier versions of
> > Tomcat so I would like the think it is still doable.
> >
>
> Ok, this has taken us a long way just to start from the beginning ;-)
>
> You might want to change your web.xml to something like
>
>     <servlet>
>         <servlet-name>hello</servlet-name>
>         <servlet-class>helloworld.Hello</servlet-class>
>     </servlet>
>
>     <servlet-mapping>
>         <servlet-name>hello</servlet-name>
>         <url-pattern>/</url-pattern>
>     </servlet-mapping>
>
>     <servlet-mapping>
>         <servlet-name>default</servlet-name>
>         <url-pattern>*.gif</url-pattern>
>     </servlet-mapping>
>
>     <servlet-mapping>
>         <servlet-name>default</servlet-name>
>         <url-pattern>*.jpg</url-pattern>
>     </servlet-mapping>
>
> My first thought was to apply a pattern like
> <url-pattern>/images/*</url-pattern> to map the entire image folder to
> default but that did not work. Maybe I am too dumb or I am completely
> missing something ;-? Somebody please give me a hint!
>
> However, another approach that has been suggested by another poster is to
> employ some filter for your request processing. Thus, you can take care of
> every incoming request and dispatch it as needed.
>
> -Stefan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


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


Mime
View raw message