Hello Mark, What you have done will only affect servlets inside your context at the location: www.domainname.com/main/
What you want to do is to define your context as the root context: <Context path="" docBase="main" debug="0"/> Note that if not defined, Tomcat defaults the root context to a directory inside webapps named "ROOT". Now you can access your app via: www.domainname.com/ And all the configuration that you have done such as mapping *.html to your servlet will work. BTW, you can also use a filter instead of a servlet. Jake Wednesday, July 17, 2002, 12:44:26 PM, you wrote: MB> Hi, MB> I am using Tomcat 4.0. The problem I am having is that I can't get the root MB> context relative to my web site, as in the format www.domainname.com/, to MB> point to my own servlet AND still use the "default servlet" to handle file MB> extensions which my servlet does not cater for. I either have to add some MB> text to the URLs I use as in the format www.domainname.com/main/ or I have to MB> take over all the responsibilities of the default servlet myself. MB> The latter is obviously not what I would choose, but neither do I want MB> someone to have to type www.domainname.com/main/, and it seems to me the only MB> other option is to use welcome files. Unfortunately, this seems to require a MB> file such as index.html but I want the first contact with my web site to be MB> through my servlet so I can establish whether the user has cookies switched MB> on and so I can dynamically customise the first page made visible. MB> I have tried mappings such as the following in my web.xml, to no avail: MB> <servlet-name>mainservlet</servlet-name> MB> <url-pattern>*.html</url-pattern> MB> <servlet-name>mainservlet</servlet-name> MB> <url-pattern>*.htm</url-pattern> MB> Maybe I have missed some documentation somewhere, but I really would MB> appreciate some help. MB> Thanks in advance, MB> Mark MB> -- MB> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> MB> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- Best regards, Jacob mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
