http://nagoya.apache.org/bugzilla/show_bug.cgi?id=97 *** shadow/97 Sat Feb 3 17:55:22 2001 --- shadow/97.tmp.27200 Sat Feb 3 17:55:22 2001 *************** *** 0 **** --- 1,44 ---- + +============================================================================+ + | If 'default servlet' defined, I can't refer to static resources (images, s | + +----------------------------------------------------------------------------+ + | Bug #: 97 Product: Tomcat 3 | + | Status: RESOLVED Version: 3.1.1 Final | + | Resolution: WORKSFORME Platform: All | + | Severity: Normal OS/Version: All | + | Priority: High Component: Auth | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | 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. + + ------- Additional Comments From [EMAIL PROTECTED] 2001-02-03 17:55 ------- + This is not a bug, the correct config to achieve what you want is : + + <servlet-mapping> + <servlet-name> + MyTest + </servlet-name> + <url-pattern> + /* + </url-pattern> + </servlet-mapping> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]