You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim O'Dowd <to...@hotmail.com> on 2003/06/06 23:24:18 UTC

using element

I am trying to setup an error page for 404 errors in tomcat4.1.24.  The 
web.xml file worked fine originally.  So I added the error-code element 
within the <web-app> element:

<web-app>
...
<--I added this part-->
    <error-page>
        <error-code>
            404
        </error-code>
        <location>
            /jsp/shared/Error_404.jsp
        </location>
    </error-page>
<--end of part I added-->
...
</web-app>

When I start tomcat, i get an exception complaining about the content of 
web-app must contain .... and a parse error is reported at the last line 
(</web-app>) of the file. Does anyone see my error?

thanks for any help.
tim

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus


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


Re: using element

Posted by Bill Barker <wb...@wilshire.com>.
Any <error-page> elements must come after <welcome-file-list> and before
<tablib> elements.  The error message gives you enough info to put it in the
correct order.

"Tim O'Dowd" <to...@hotmail.com> wrote in message
news:BAY2-F19PgZpGMFdmdu00003aba@hotmail.com...
> I am trying to setup an error page for 404 errors in tomcat4.1.24.  The
> web.xml file worked fine originally.  So I added the error-code element
> within the <web-app> element:
>
> <web-app>
> ...
> <--I added this part-->
>     <error-page>
>         <error-code>
>             404
>         </error-code>
>         <location>
>             /jsp/shared/Error_404.jsp
>         </location>
>     </error-page>
> <--end of part I added-->
> ...
> </web-app>
>
> When I start tomcat, i get an exception complaining about the content of
> web-app must contain .... and a parse error is reported at the last line
> (</web-app>) of the file. Does anyone see my error?
>
> thanks for any help.
> tim
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus




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


Re: using element

Posted by Joël Wijngaarde <jo...@usmedia.nl>.
Are you sure you added the error-page at the correct position inside the
web.xml file. Remember, order is important !

/ Joel

On Fri, 2003-06-06 at 23:24, Tim O'Dowd wrote:
> I am trying to setup an error page for 404 errors in tomcat4.1.24.  The 
> web.xml file worked fine originally.  So I added the error-code element 
> within the <web-app> element:
> 
> <web-app>
> ...
> <--I added this part-->
>     <error-page>
>         <error-code>
>             404
>         </error-code>
>         <location>
>             /jsp/shared/Error_404.jsp
>         </location>
>     </error-page>
> <--end of part I added-->
> ...
> </web-app>
> 
> When I start tomcat, i get an exception complaining about the content of 
> web-app must contain .... and a parse error is reported at the last line 
> (</web-app>) of the file. Does anyone see my error?
> 
> thanks for any help.
> tim
> 
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
> http://join.msn.com/?page=features/virus
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 3
-- 
Joël Wijngaarde <jo...@usmedia.nl>
Us Media


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