You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by BugRat Mail System <to...@cortexity.com> on 2000/09/08 10:03:26 UTC

BugRat Report #87 has been filed.

Bug report #87 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com:8888/BugRatViewer/ShowReport/87>

REPORT #87 Details.

Project: Tomcat
Category: Feature Requests
SubCategory: Enhancement
Class: suggest
State: received
Priority: medium
Severity: non-critical
Confidence: public
Environment: 
   Release: Tomcat 3.1
   JVM Release: JRE-1.2.2_006
   Operating System: MS WindowsNT
   OS Release: 4.0 SP5
   Platform: x86

Synopsis: 
If 'default servlet' defined, I can't refer to static resources (images, stylesheets)

Description:
I wanted to bind context URL to my 'root' or 'welcome' servlet.
In 'web.xml' I defined 'default servlet' as:
<servlet-mapping>
 <servlet-name>
   MyTest
 </servlet-name>
 <url-pattern>
   /
 </url-pattern>
</servlet-mapping>
Servlet works, but all resources specified in generated HTML document becomes inaccessible. Examples (this is 'root' context):
<LINK REL="stylesheet" TYPE="text/css" HREF="/testapp.css">
<IMG SRC="/images/app_logo.gif" ALT="Application LOGO">
I suspict that for all URLs, that belong to context, all requests are redirected to 'default servlet' if it defined.
But I just wanted to map this servlet to context path URL.
When I change 'url-pattern' to any other, for example '/test', document (with '/test' appended to URL) are displayed correctly. In this situation I have to use 'static' index.html as 'welcome' page.