tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fredrik Jonson <pt97...@student.bth.se>
Subject Servlet mapping for root directory in a webapp?
Date Thu, 07 Aug 2003 07:46:48 GMT
Hello, 

I'm trying to get tomcat (from sun's jwsdp1.2) to do a default mapping. 

Ie, in my webbapp /stuff/ I want to get a servlet to serve the root 
"page". As I understand it there is a default servlet that serves 
static content, I do not want to replace that one, but only load a
specific servlet for the root url for my webapp.

I (and a lot of other people, apparently =) have tried:

        <servlet-mapping>
                <servlet-name>MainView</servlet-name>    
                <url-pattern>/</url-pattern>
        </servlet-mapping>

as I found it on a lot of search results, but as I understand it
that pattern is already "taken" by the default servlet. It doesn't
work.

I have had little succes searching google, and the documentation for 
solutions. Is it at all possible, or does everyone just use a dummy
index.html in the root directory and forwards the users to the real
content serving servlet? 

TIA
-- 
Fredrik Jonson


Mime
View raw message