You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jf...@apache.org on 2004/08/25 21:25:46 UTC

cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

jfarcand    2004/08/25 12:25:46

  Modified:    util/java/org/apache/tomcat/util/http/mapper Mapper.java
  Log:
  Add missing case to support the following web.xml:
  
      <servlet>
          <display-name>ServletTest</display-name>
          <servlet-name>ServletTest</servlet-name>
          <servlet-class>test.ServletTest</servlet-class>
      </servlet>
      <servlet-mapping>
          <servlet-name>ServletTest</servlet-name>
          <url-pattern>*.screen</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
         <welcome-file>welcome.screen</welcome-file>
      </welcome-file-list>
  
  All Servlet TCKs passed. Please review (I recall some discussion on welcome file but can't find those emails).
  
  Revision  Changes    Path
  1.41      +9 -0      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java
  
  Index: Mapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- Mapper.java	27 Jun 2004 23:56:23 -0000	1.40
  +++ Mapper.java	25 Aug 2004 19:25:46 -0000	1.41
  @@ -751,10 +751,19 @@
                               }
                           }
                       }
  +                
  +                    // Rule 4d -- Welcome resources that 
  +                    //            are mapped to an extension.
  +                    if (mappingData.wrapper == null) {
  +                        internalMapExtensionWrapper(extensionWrappers, 
  +                                                    path, mappingData);
  +                    } 
                   }
  +
                   path.setOffset(servletPath);
                   path.setEnd(pathEnd);
               }
  +                                        
           }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

Posted by Jeanfrancois Arcand <jf...@apache.org>.

Remy Maucherat wrote:

> Jeanfrancois Arcand wrote:
>
>> Actually, yes, raise them :-)  This is the perfect time for raising 
>> issues to the spec leads if we want a fix for the next spec revision. 
>> This mapping issue was sent by the spec leads, so probably somebody 
>> else complained about that. 
>
>
> I have two issues:
> a) I don't understand the lifecycle of sessions with cross context (I 
> had sent you a private email in relation to the portlet spec TCK, 
> which somehow considers this as something which can be tested; I 
> suppose it was tested with TC 4.1 ;) )

Yes, that one is "in progress" :-)

> b) there are a lot of requirements when dispatching requests, which 
> needs wrapping, and at the same time, the spec wants to disallow 
> wrapping in some cases (obviously, we always wrap in Tomcat)

OK I will see what I can do with that one (I need to read the spec again 
and pinpoint exactly where it should be "re-phrased"

Thanks!

-- Jeanfrancois

>
> Rémy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

Posted by Remy Maucherat <re...@apache.org>.
Jeanfrancois Arcand wrote:

> Actually, yes, raise them :-)  This is the perfect time for raising 
> issues to the spec leads if we want a fix for the next spec revision. 
> This mapping issue was sent by the spec leads, so probably somebody 
> else complained about that. 

I have two issues:
a) I don't understand the lifecycle of sessions with cross context (I 
had sent you a private email in relation to the portlet spec TCK, which 
somehow considers this as something which can be tested; I suppose it 
was tested with TC 4.1 ;) )
b) there are a lot of requirements when dispatching requests, which 
needs wrapping, and at the same time, the spec wants to disallow 
wrapping in some cases (obviously, we always wrap in Tomcat)

Rémy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

Posted by Jeanfrancois Arcand <jf...@apache.org>.

Remy Maucherat wrote:

> Jeanfrancois Arcand wrote:
>
>>
>>
>> Remy Maucherat wrote:
>>
>>> jfarcand@apache.org wrote:
>>>
>>>> jfarcand    2004/08/25 12:25:46
>>>>
>>>>  Modified:    util/java/org/apache/tomcat/util/http/mapper Mapper.java
>>>>  Log:
>>>>  Add missing case to support the following web.xml:
>>>>  
>>>>      <servlet>
>>>>          <display-name>ServletTest</display-name>
>>>>          <servlet-name>ServletTest</servlet-name>
>>>>          <servlet-class>test.ServletTest</servlet-class>
>>>>      </servlet>
>>>>      <servlet-mapping>
>>>>          <servlet-name>ServletTest</servlet-name>
>>>>          <url-pattern>*.screen</url-pattern>
>>>>      </servlet-mapping>
>>>>      <welcome-file-list>
>>>>         <welcome-file>welcome.screen</welcome-file>
>>>>      </welcome-file-list>
>>>>  
>>>>  All Servlet TCKs passed. Please review (I recall some discussion 
>>>> on welcome file but can't find those emails).
>>>>  
>>>>
>>> -1, this was on purpose. Extension mapping in welcome files cannot 
>>> work.
>>> Since you have no way of testing if the resource exists or not, the 
>>> request will *always* be redirected to the welcome file. It also 
>>> means that, with the default settings and mappings, all requests to 
>>> a folder will end up being redirected to index.jsp. I thought this 
>>> was obvious enough.
>>
>>
>>
>> Not enough for me ;-). So if it's impossible, the spec should be 
>> updated, righ?
>
>
> Sorry, I'm almost certain I had talked about it earlier: that's the 
> reason for my comment.
> I really don't see any way to implement it (if you find one ...), so 
> IMO the spec is broken for extension mapping with welcome files (since 
> they'll always match *.jsp with index.jsp - ok, I know, it's a static 
> file, so there's a way to check in the special case).

OK I will investigate more.

> For exact or wildcard mappings, there's no problem.
>
> If you want more spec issues, let me know :)
> (right now, I have session handling with cross context, and also 
> request dispatching and wrapping)

Actually, yes, raise them :-)  This is the perfect time for raising 
issues to the spec leads if we want a fix for the next spec revision. 
This mapping issue was sent by the spec leads, so probably somebody else 
complained about that.

Thanks

-- Jeanfrancois

>
> Rémy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

Posted by Remy Maucherat <re...@apache.org>.
Jeanfrancois Arcand wrote:

>
>
> Remy Maucherat wrote:
>
>> jfarcand@apache.org wrote:
>>
>>> jfarcand    2004/08/25 12:25:46
>>>
>>>  Modified:    util/java/org/apache/tomcat/util/http/mapper Mapper.java
>>>  Log:
>>>  Add missing case to support the following web.xml:
>>>  
>>>      <servlet>
>>>          <display-name>ServletTest</display-name>
>>>          <servlet-name>ServletTest</servlet-name>
>>>          <servlet-class>test.ServletTest</servlet-class>
>>>      </servlet>
>>>      <servlet-mapping>
>>>          <servlet-name>ServletTest</servlet-name>
>>>          <url-pattern>*.screen</url-pattern>
>>>      </servlet-mapping>
>>>      <welcome-file-list>
>>>         <welcome-file>welcome.screen</welcome-file>
>>>      </welcome-file-list>
>>>  
>>>  All Servlet TCKs passed. Please review (I recall some discussion on 
>>> welcome file but can't find those emails).
>>>  
>>>
>> -1, this was on purpose. Extension mapping in welcome files cannot work.
>> Since you have no way of testing if the resource exists or not, the 
>> request will *always* be redirected to the welcome file. It also 
>> means that, with the default settings and mappings, all requests to a 
>> folder will end up being redirected to index.jsp. I thought this was 
>> obvious enough.
>
>
> Not enough for me ;-). So if it's impossible, the spec should be 
> updated, righ?

Sorry, I'm almost certain I had talked about it earlier: that's the 
reason for my comment.
I really don't see any way to implement it (if you find one ...), so IMO 
the spec is broken for extension mapping with welcome files (since 
they'll always match *.jsp with index.jsp - ok, I know, it's a static 
file, so there's a way to check in the special case).
For exact or wildcard mappings, there's no problem.

If you want more spec issues, let me know :)
(right now, I have session handling with cross context, and also request 
dispatching and wrapping)

Rémy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

Posted by Jeanfrancois Arcand <jf...@apache.org>.

Remy Maucherat wrote:

> jfarcand@apache.org wrote:
>
>> jfarcand    2004/08/25 12:25:46
>>
>>  Modified:    util/java/org/apache/tomcat/util/http/mapper Mapper.java
>>  Log:
>>  Add missing case to support the following web.xml:
>>  
>>      <servlet>
>>          <display-name>ServletTest</display-name>
>>          <servlet-name>ServletTest</servlet-name>
>>          <servlet-class>test.ServletTest</servlet-class>
>>      </servlet>
>>      <servlet-mapping>
>>          <servlet-name>ServletTest</servlet-name>
>>          <url-pattern>*.screen</url-pattern>
>>      </servlet-mapping>
>>      <welcome-file-list>
>>         <welcome-file>welcome.screen</welcome-file>
>>      </welcome-file-list>
>>  
>>  All Servlet TCKs passed. Please review (I recall some discussion on 
>> welcome file but can't find those emails).
>>  
>>
> -1, this was on purpose. Extension mapping in welcome files cannot work.
> Since you have no way of testing if the resource exists or not, the 
> request will *always* be redirected to the welcome file. It also means 
> that, with the default settings and mappings, all requests to a folder 
> will end up being redirected to index.jsp. I thought this was obvious 
> enough.

Not enough for me ;-). So if it's impossible, the spec should be 
updated, righ?

-- Jeanfrancois


>
> Rémy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

Posted by Remy Maucherat <re...@apache.org>.
jfarcand@apache.org wrote:

>jfarcand    2004/08/25 12:25:46
>
>  Modified:    util/java/org/apache/tomcat/util/http/mapper Mapper.java
>  Log:
>  Add missing case to support the following web.xml:
>  
>      <servlet>
>          <display-name>ServletTest</display-name>
>          <servlet-name>ServletTest</servlet-name>
>          <servlet-class>test.ServletTest</servlet-class>
>      </servlet>
>      <servlet-mapping>
>          <servlet-name>ServletTest</servlet-name>
>          <url-pattern>*.screen</url-pattern>
>      </servlet-mapping>
>      <welcome-file-list>
>         <welcome-file>welcome.screen</welcome-file>
>      </welcome-file-list>
>  
>  All Servlet TCKs passed. Please review (I recall some discussion on welcome file but can't find those emails).
>  
>
-1, this was on purpose. Extension mapping in welcome files cannot work.
Since you have no way of testing if the resource exists or not, the 
request will *always* be redirected to the welcome file. It also means 
that, with the default settings and mappings, all requests to a folder 
will end up being redirected to index.jsp. I thought this was obvious 
enough.

Rémy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org