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 Tue, 08 Jul 2003 22:33:32 GMT
Hi,

SRV.11 does apply to the problem I am having of images not appearing and has
taken my issue in a new direction.

Stefan, you put me onto the right track - I have the servlet working
properly and displaying the images the way it should (Kudo's for pointing
out the <now> obvious).  What I have done is:

    Update conf/server.xml to contain <Context path="/test" ...
    Update webapps/helloworld/WEB-INF/web.xml to contain
<url-pattern>/hello</url-pattern>

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.

Mark Biciunas
mark.biciunas@agorex.com
----- Original Message -----
From: "Robert Wray" <wray@arc.ab.ca>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, July 08, 2003 5:52 PM
Subject: Re: images not appearing


> Chapter 11 of  http://www.alexandria.ucsb.edu/dev/doc/java/servlet_2.3.pdf
>
> I don't see how this spec applies to this problem however. Can someone
> please post one specific example of how to reference a file of some sort
> that is being requested from a servlet.
>
> At 05:49 PM 08/07/2003 -0400, you wrote:
> >Hi,
> >
> >I changed webapps/helloworld/WEB-INF/web.xml to have a url pattern of
> >/hello.  I also changed conf/server.xml to set the Context path="/hello".
> >When I go to my browser with http://192.168.1.3/hello, I get a directory
> >listing for /.  This is great because I can see the images directory
(with
> >my images properly in place).  Unfortunately, the servlet doesn't execute
at
> >all????
> >
> >I would like to think I would see the servlet executing.  Any ideas?
Also,
> >this solution is problematic anyways, as I need to parse all incoming
> >requests and respond to them, Only multimedia (images, etc.) should not
be
> >handled by the servlet.
> >
> >BTW, I can't find the spec SVR.11 - anyone have a link?
> >
> >Mark Biciunas
> >mark.biciunas@agorex.com
> >----- Original Message -----
> >From: "Stefan Radzom" <sradzom@web.de>
> >To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
> >Sent: Tuesday, July 08, 2003 4:44 PM
> >Subject: RE: images not appearing
> >
> >
> > > > -----Original Message-----
> > > > In webapps/hello/WEB-INF/web.xml, I have the following:
> > > >
> > > >     <web-app>
> > > >         ...
> > > >         <servlet>
> > > >             <servlet-name>helloworld</servlet-name>
> > > >             <servlet-class>helloworld.Hello</servlet-class>
> > > >         </servlet>
> > > >
> > > >         <servlet-mapping>
> > > >             <servlet-name>helloworld</servlet-name>
> > > >             <url-pattern>/</url-pattern>
> > > >         </servlet-mapping>
> > > >
> > > >     </web-app>
> > > >
> > > >
> > >
> > > You are trying to map every request to your helloworld servlet. This
means
> > > really *all* requests (including images etc.) Try to be a bit more
> >specific,
> > > like <url-pattern>/helloworld</url-pattern> . See the spec (SRV.11)
for
> >more
> > > details on request mappings.
> > >
> > > -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
>
>
> ---------------------------------------------------------------------
> 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