You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ian van der Neut <iv...@gmail.com> on 2005/03/01 10:07:49 UTC

error-page directive

Hello all,

I have a web.xml (attached) that works fine if I remove the error-page
directive, but gives a

Exception initializing TldLocationsCache: XML parsing error on file
/WEB-INF/web.xml: (line 72, col 11): The content of element type
"web-app" must match
"(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".

message when the indicated (java.lang.ClassNotFoundException) is
encountered. I checked docs and books, but I can't find anything wrong
with the web.xml. The template web.xml I used is the one from the
struts 1.2.4 package.

Could anyone please tell me what is wrong with this deployment descriptor?

Thank you very much in advance for any input,

Ian.

Re: error-page directive

Posted by Lionel Farbos <li...@free.fr>.
Perhaps, try to put error-page BEFORE taglib...

On Tue, 1 Mar 2005 10:07:49 +0100
Ian van der Neut <iv...@gmail.com> wrote:

> Hello all,
> 
> I have a web.xml (attached) that works fine if I remove the error-page
> directive, but gives a
> 
> Exception initializing TldLocationsCache: XML parsing error on file
> /WEB-INF/web.xml: (line 72, col 11): The content of element type
> "web-app" must match
> "(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".
> 
> message when the indicated (java.lang.ClassNotFoundException) is
> encountered. I checked docs and books, but I can't find anything wrong
> with the web.xml. The template web.xml I used is the one from the
> struts 1.2.4 package.
> 
> Could anyone please tell me what is wrong with this deployment descriptor?
> 
> Thank you very much in advance for any input,
> 
> Ian.
> 

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


Re: error-page directive

Posted by "Trond G. Ziarkowski" <tr...@gep-as.com>.
Hi,

the order does matter, and the order is specified in the dtd that you 
are using for your webapp.


Trond


Ian van der Neut wrote:

>On Tue, 1 Mar 2005 10:41:36 +0100, Ian van der Neut <iv...@gmail.com> wrote:
>  
>
>>On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski
>><tr...@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


Re: error-page directive

Posted by David Smith <dn...@cornell.edu>.
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 <iv...@gmail.com> wrote:
>  
>
>>On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski
>><tr...@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


Re: error-page directive

Posted by Ian van der Neut <iv...@gmail.com>.
On Tue, 1 Mar 2005 10:41:36 +0100, Ian van der Neut <iv...@gmail.com> wrote:
> On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski
> <tr...@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


Re: error-page directive

Posted by Ian van der Neut <iv...@gmail.com>.
On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski
<tr...@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.

Thank you so far, it's much appreciated,

Ian.

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


Re: error-page directive

Posted by "Trond G. Ziarkowski" <tr...@gep-as.com>.
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.

Trond

>  <!-- The Usual Welcome File List -->
>  <welcome-file-list>
>    <welcome-file>index.jsp</welcome-file>
>  </welcome-file-list>
>  
>
  <error-page>
    <exception-type>java.lang.ClassNotFoundException</exception-type>
    <location>/pages/apperror.jsp</location>
  </error-page>

>  <!-- Struts Tag Library Descriptors -->
>  <taglib>
>    <taglib-uri>/tags/struts-bean</taglib-uri>
>    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>  </taglib>
></web-app>
>


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


Tomcat multiple instancies

Posted by Andrea Anastasescu <an...@yahoo.com>.
Hello everybody,

I need to run 2 different instacies of Tomcat 4.1.
The instacies are different in both used common and
shared jars  and the webapplications.
Is this managable? How?
Thank you in advance,
Andrea Anastasescu


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

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