Thanks for the info, Peter. I'm somewhat new to using Tomcat, so if there's 
somewhere particular I should post this as a bug, please let me know.

It is at least comforting to know that I can work around this by avoiding the 
use of a wildcard mapping to the JSF servlet.

Thanks,

- Tim


-----Original Message-----
From: Peter Menzel <[EMAIL PROTECTED]>
Sent: Nov 8, 2005 10:07 AM
To: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: Use of JSF view in welcome file list

Tim Dean wrote:
> Peter,
> 
> Thanks for the example: I had seen examples like this in the archives, which 
> is why I thought that I could do what I'm trying to do: I want the same kind 
> of behavior you are describing, but with a mapping to the Faces servlet 
> instead.
> 
> If the examply you've provided works, any ideas why my JSF setup would not 
> work? In my environment, I request "http://localhost:8080/pdm/main.faces";, 
> which works fine. If I instead request "http://localhost:8080/pdm/";, it 
> instead shows me a directory listing of the files in my web app.
> 
> Is there a problem with using a wildcard in my JSF servlet mapping that 
> causes it to fail with welcom files? Or is there something inherently odd 
> with JSF that makes this impossible to do?
> 
> Thanks,
> 
> - Tim

Actually, I never worked with Faces before, so I can't tell.

Therefore I tried with a normal servlet and wildcard extension:

<servlet-mapping>
        <servlet-name>Home</servlet-name>
        <url-pattern>*.bar</url-pattern>
</servlet-mapping>
<welcome-file-list>
        <welcome-file>foo.bar</welcome-file>
</welcome-file-list>

and: accessing http://localhost/mywebapp/ prints the directory listing !
Unfortunately, that is not what I expected.

Tomcat should have appended "foo.bar" to "/" resulting in "/foo.bar" and 
  should then match Home servlet to this request.

Using this mapping

<servlet-mapping>
        <servlet-name>Home</servlet-name>
        <url-pattern>/foo.bar</url-pattern>
</servlet-mapping>

Tomcat is invoking the Home Servlet.

So this looks not like a specific JSF problem.
It looks like a bug in Tomcat?

The Servlet spec states: "The web server must append each welcome file 
in the order specified in the DD to the partial request and check 
whether a static resource or servlet in the WAR is mapped to that 
request URI."

Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to