You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chandra Gottipati <cg...@algx.net> on 2003/01/21 23:44:05 UTC

Configuring error page in web.xml

I am trying to configure a custom error page for 404 errors in the web.xml
file under \jakarta-tomcat-4.1.12\conf
and I keep getting the following exception:


ERROR [main] (Digester.java:1038) - End event threw exception
java.lang.IllegalArgumentException: argument type mismatch
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
        at
org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:491)
        at
org.apache.commons.digester.Digester.endElement(Digester.java:1036)
        at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav
a:579)
        at
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java
:646)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:1972)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:8
78)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDo
cumentFragmentScannerImpl.java:1144)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:987)


this is what I have at the end of the web.xml file

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

  <error-page>
    <error-code>404</error-code>
    <location>/errors/errorPage.html</location>
  </error-page>

</web-app>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: REBOOT MACHINE

Posted by Mauricio Matias <ma...@iron.com.br>.
Win 2k

Now I know that when i tried to shutdown tomcat nothing happens, so, i cant 
shutdown that, do you know why?


At 18:30 21/1/2003 -0500, you wrote:
>At 09:11 PM 1/21/2003 -0200, Mauricio Matias wrote:
>>Hey people, is normal i have to reboot my comp when I change anything in 
>>classhpath or server.xml or web.xml. It isnt enough restart Tomcat.
>
>It's not normal.  A change in either XML file should (IIRC)
>take effect the next time you start Tomcat, no matter what.
>Can you give more detail, like what OS you're using, etc.?
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: REBOOT MACHINE

Posted by Paul Brinkley <la...@starpower.net>.
At 09:11 PM 1/21/2003 -0200, Mauricio Matias wrote:
>Hey people, is normal i have to reboot my comp when I change anything in 
>classhpath or server.xml or web.xml. It isnt enough restart Tomcat.

It's not normal.  A change in either XML file should (IIRC)
take effect the next time you start Tomcat, no matter what.
Can you give more detail, like what OS you're using, etc.?


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


REBOOT MACHINE

Posted by Mauricio Matias <ma...@iron.com.br>.
Hey people, is normal i have to reboot my comp when I change anything in 
classhpath or server.xml or web.xml. It isnt enough restart Tomcat.





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Tomcat 5 - 302 issue resolved??? (please please please)

Posted by neal <ne...@yahoo.com>.
There was a discussion a month or two ago about fixing the issue wherein
Tomcat *redirects* to the welcome page rather than forwarding to it.  For
instance, www.abc.com would be redirected to www.abc.com/index.html.  Was
this issue in fact resolved in Tomcat 5.0?

I attempted to take a look at the change log but its empty.  :(

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/CHANGELOG.txt


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re[2]: Configuring error page in web.xml

Posted by Jacob Kjome <ho...@visi.com>.
Hello Chandra,

Ok, then I'm not sure what the issue is?  Are you saying that it
started up fine before you edited the web.xml and after you added the
stuff you mentioned, it failed?

I would suggest removing the <error-page> stuff and only put that in
your webapp's web.xml, not the conf/web.xml.  If you configure this in
the global web.xml, you force the assumption that each webapp contains
an "error" directory off the root of each respective context.  You
can't make this assumption for webapps that you didn't write.  I
suggest putting that config in your own web.xml.

Jake

Wednesday, January 22, 2003, 10:41:44 AM, you wrote:

CG> I validated the web.xml file with XMLSpy and it says the file is valid!


CG> ----- Original Message -----
CG> From: "Jacob Kjome" <ho...@visi.com>
CG> To: "Tomcat Users List" <to...@jakarta.apache.org>
CG> Sent: Tuesday, January 21, 2003 8:55 PM
CG> Subject: Re: Configuring error page in web.xml


>>
>> Find an IDE to validate your web.xml such as XMLSpy.  You will probably
>> find that the problem is either the xml file is not well formed and/or the
>> xml file is not valid based on the provided DTD.
>>
>> Jake
>>
>> At 04:44 PM 1/21/2003 -0600, you wrote:
>> >I am trying to configure a custom error page for 404 errors in the
CG> web.xml
>> >file under \jakarta-tomcat-4.1.12\conf
>> >and I keep getting the following exception:
>> >
>> >
>> >ERROR [main] (Digester.java:1038) - End event threw exception
>> >java.lang.IllegalArgumentException: argument type mismatch
>> >         at java.lang.reflect.Method.invoke(Native Method)
>> >         at
>>
>>org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
>> >         at
>> >org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:491)
>> >         at
>> >org.apache.commons.digester.Digester.endElement(Digester.java:1036)
>> >         at
>>
>>org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.ja
CG> v
>> >a:579)
>> >         at
>>
>>org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.jav
CG> a
>> >:646)
>> >         at
>>
>>org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator
CG> .
>> >java:1972)
>> >         at
>>
>>org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:
CG> 8
>> >78)
>> >         at
>>
>>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLD
CG> o
>> >cumentFragmentScannerImpl.java:1144)
>> >         at
>>
>>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDoc
CG> u
>> >mentFragmentScannerImpl.java:987)
>> >
>> >
>> >this is what I have at the end of the web.xml file
>> >
>> >     <welcome-file-list>
>> >         <welcome-file>index.html</welcome-file>
>> >         <welcome-file>index.htm</welcome-file>
>> >         <welcome-file>index.jsp</welcome-file>
>> >     </welcome-file-list>
>> >
>> >   <error-page>
>> >     <error-code>404</error-code>
>> >     <location>/errors/errorPage.html</location>
>> >   </error-page>
>> >
>> ></web-app>
>> >
>> >
>> >--
>> >To unsubscribe, e-mail:
CG> <ma...@jakarta.apache.org>
>> >For additional commands, e-mail:
CG> <ma...@jakarta.apache.org>
>>


CG> --
CG> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
CG> For additional commands, e-mail: <ma...@jakarta.apache.org>



-- 
Best regards,
 Jacob                            mailto:hoju@visi.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


ErrNo=61

Posted by "Ravindra K. Bhat" <bh...@BPA.Arizona.EDU>.
Hi:
My ModJK log shows the following error: (I have Tomcat 4.0.6 w/ Apache
2.0.43 on NT)...

[Wed Jan 22 08:57:20 2003]  [jk_connect.c (177)]: jk_open_socket,
connect() failed errno = 61
[Wed Jan 22 08:57:20 2003]  [jk_ajp_common.c (626)]: In
jk_endpoint_t::ajp_connect_to_endpoint, failed errno = 61

Any ideas?

Thanks
Ravi


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuring error page in web.xml

Posted by Chandra Gottipati <cg...@algx.net>.
I validated the web.xml file with XMLSpy and it says the file is valid!


----- Original Message -----
From: "Jacob Kjome" <ho...@visi.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, January 21, 2003 8:55 PM
Subject: Re: Configuring error page in web.xml


>
> Find an IDE to validate your web.xml such as XMLSpy.  You will probably
> find that the problem is either the xml file is not well formed and/or the
> xml file is not valid based on the provided DTD.
>
> Jake
>
> At 04:44 PM 1/21/2003 -0600, you wrote:
> >I am trying to configure a custom error page for 404 errors in the
web.xml
> >file under \jakarta-tomcat-4.1.12\conf
> >and I keep getting the following exception:
> >
> >
> >ERROR [main] (Digester.java:1038) - End event threw exception
> >java.lang.IllegalArgumentException: argument type mismatch
> >         at java.lang.reflect.Method.invoke(Native Method)
> >         at
>
>org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
> >         at
> >org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:491)
> >         at
> >org.apache.commons.digester.Digester.endElement(Digester.java:1036)
> >         at
>
>org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.ja
v
> >a:579)
> >         at
>
>org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.jav
a
> >:646)
> >         at
>
>org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator
.
> >java:1972)
> >         at
>
>org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:
8
> >78)
> >         at
>
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLD
o
> >cumentFragmentScannerImpl.java:1144)
> >         at
>
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDoc
u
> >mentFragmentScannerImpl.java:987)
> >
> >
> >this is what I have at the end of the web.xml file
> >
> >     <welcome-file-list>
> >         <welcome-file>index.html</welcome-file>
> >         <welcome-file>index.htm</welcome-file>
> >         <welcome-file>index.jsp</welcome-file>
> >     </welcome-file-list>
> >
> >   <error-page>
> >     <error-code>404</error-code>
> >     <location>/errors/errorPage.html</location>
> >   </error-page>
> >
> ></web-app>
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuring error page in web.xml

Posted by Jacob Kjome <ho...@visi.com>.
Find an IDE to validate your web.xml such as XMLSpy.  You will probably 
find that the problem is either the xml file is not well formed and/or the 
xml file is not valid based on the provided DTD.

Jake

At 04:44 PM 1/21/2003 -0600, you wrote:
>I am trying to configure a custom error page for 404 errors in the web.xml
>file under \jakarta-tomcat-4.1.12\conf
>and I keep getting the following exception:
>
>
>ERROR [main] (Digester.java:1038) - End event threw exception
>java.lang.IllegalArgumentException: argument type mismatch
>         at java.lang.reflect.Method.invoke(Native Method)
>         at
>org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
>         at
>org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:491)
>         at
>org.apache.commons.digester.Digester.endElement(Digester.java:1036)
>         at
>org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav
>a:579)
>         at
>org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java
>:646)
>         at
>org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
>java:1972)
>         at
>org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:8
>78)
>         at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDo
>cumentFragmentScannerImpl.java:1144)
>         at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
>mentFragmentScannerImpl.java:987)
>
>
>this is what I have at the end of the web.xml file
>
>     <welcome-file-list>
>         <welcome-file>index.html</welcome-file>
>         <welcome-file>index.htm</welcome-file>
>         <welcome-file>index.jsp</welcome-file>
>     </welcome-file-list>
>
>   <error-page>
>     <error-code>404</error-code>
>     <location>/errors/errorPage.html</location>
>   </error-page>
>
></web-app>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>