tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: error-page directive
Date Tue, 01 Mar 2005 14:39:30 GMT
For good docs, I've found the servlet spec an excellent place to start.  
As a foot note though, Tomcat seems switches between servlet spec 2.3 
and 2.4 depending on how the web-app node is defined in web.xml.  If you 
declare it against the 2.3 DTD, the 2.3 spec is used.  If you use the 
2.4 schema, 2.4 spec is adhered to.  See the spec for how each is 
declared in web.xml.

Servlet spec 2.3: http://www.jcp.org/en/jsr/detail?id=53

Servlet spec 2.4: http://www.jcp.org/en/jsr/detail?id=154

--David

Graba, Jan wrote:

>Hi, again.
>
>I don't really think it makes any difference to this application, but I'm using J2SE,
not J2EE. Though I am, of course, using a
>web.xml file for my web application, nothing in this file need reference the error page.
At least, that was the case with version
>2.3 of the servlet API under Tomcat 4.1, since the error page worked faultlessly under
that. Is 2.4 more restrictive? Is an
>error-page tag now mandatory? Is this change documented? Since I currently have only servlet
and servlet-mapping tags in my
>web.xml, can I simply place the tag where I wish?
>
>Sorry for the proliferation of fairly trivial questions.
>
>Thanks in anticipation.
>
>Cheers.
>Jan
>
>-----Original Message-----
>From: David Smith [mailto:dns4@cornell.edu] 
>Sent: 01 March 2005 13:27
>To: Tomcat Users List
>Subject: Re: error-page directive
>
>
>The order matters.  It's a requirement that comes from validating the 
>web.xml against a DTD -- not anything that Tomcat itself requires.  In 
>the servlet 2.4 spec, they moved to valdating against a schema so order 
>no longer matters.
>
>--David
>
>Ian van der Neut wrote:
>
>  
>
>>On Tue, 1 Mar 2005 10:41:36 +0100, Ian van der Neut <ivdneut@gmail.com> 
>>wrote:
>> 
>>
>>    
>>
>>>On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski 
>>><trond.ziarkowski@gep-as.com> wrote:
>>>   
>>>
>>>      
>>>
>>>>Hi,
>>>>
>>>>Have you tried to move your the error-page directive to between the 
>>>><welcome-file-list> and <taglib> directives. Seem to remember
this 
>>>>happening to me some time ago as well.
>>>>     
>>>>
>>>>        
>>>>
>>>That seems to get rid of the message, but it doesn't seem to honour 
>>>the directive, because I still get tomcats default exception 
>>>stacktrace page.
>>>   
>>>
>>>      
>>>
>>The fact that it is not honoured seems to be because of a problem in 
>>the apperror.jsp file. Moving the error-page directive before the 
>>taglib directive solves the problem indeed.
>>
>>Just curious, does order matter in web.xml? If so, where is this 
>>documented? Or is this just a bug?
>>
>>Thank you very much,
>>
>>Ian.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>> 
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>

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


Mime
View raw message