You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Allan Kamau <hu...@yahoo.com> on 2002/02/18 12:56:27 UTC

error-page element in the web.xml HOWTO

I'd like to configure an error page for my entire
context.
I've gone through the web-app_2_2.dtd and came up with
the following solution which I added to my contexts
web.xml file

	<error-page>
		<error-code>404</error-code>
		<location>http://localhost:8080/</location>
	</error-page>


Now he context is been deployed but cannot be run
indicating some problem.
How can I solve this error or where am I going wrong?
 
Thank you.
Allan Kamau.



__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: error-page element in the web.xml HOWTO

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 18 Feb 2002, Allan Kamau wrote:

> Date: Mon, 18 Feb 2002 03:56:27 -0800 (PST)
> From: Allan Kamau <hu...@yahoo.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: error-page element in the web.xml HOWTO
>
> I'd like to configure an error page for my entire
> context.
> I've gone through the web-app_2_2.dtd and came up with
> the following solution which I added to my contexts
> web.xml file
>
> 	<error-page>
> 		<error-code>404</error-code>
> 		<location>http://localhost:8080/</location>
> 	</error-page>
>

This is not a valid <location> value.  You must specify the
context-relative path to a page *within* your app that should be displayed
instead, and the path must start with a '/' character.

Craig


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>