tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randall Parker" <rand...@nls.net>
Subject URL pattern rules in web.xml
Date Sun, 09 Apr 2000 20:02:08 GMT
I have this URL:
   webapps/info/GetPicture/teamtopdir/bauer1.jpg

I have a servlet called PictureGetter that is supposed to get this URL's request. 

The "webapps" part is the context path in the server.xml:
        <Context path="/webapps" docBase="iscribe"
            defaultSessionTimeOut="30" isWARExpanded="true"
            isWARValidated="false" isInvokerEnabled="true"
            isWorkDirPersistent="false"/>

Then I have the following in web.xml for the info/GetPicture and the rest:

    <servlet>
        <servlet-name>
            GetPicture
        </servlet-name>
        <servlet-class>
            sitemgmt.PictureGetter
        </servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>
            GetPicture
        </servlet-name>
        <url-pattern>
            /info/GetPicture/*
        </url-pattern>
    </servlet-mapping>

Is this the right URL Pattern to use? Or should I go /*/* or something else?

Also, since my main page URL is mapped to port 8080 (I'm not going thru Apache). But I'm using
relative URL addresses within the document. Will they all use port 8080 if the main page uses
port 
8080? That happens with my links that are href links. So I'd expect it to happen for IMG SRC
links.

Anyway, my PictureGetter servlet is not seeing any requests. Anyone have any guesses as to
why?







Mime
View raw message