I'm sure that other people are going to flame this thread as off-topic, but
the answer is to call

response.sendError(HttpServletResponse.SC_NOT_FOUND,"someweirdlink doesn't
exist");
return;



----- Original Message -----
From: "yhs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 4:31 PM
Subject: custom 404s from a servlet ?


> Hi guys,
>   does anyone know how i can modify tomcat's configuration files so my
404's can be invoked
> from a servlet ? i.e. i want http://localhost:8080/someweirdlink?x=foo to
be redirected
> to http://localhost:8080/servlet/my404servlet?x=foo if someweidrlink
doesnt exist...
> similarly if servlet abc doesnt exist http://localhost:8080/servlet/abc
should also
> be redirected to http://localhost:8080/servlet/my404servlet ...
> I'd like to keep everything else the same..i.e. jsps. html and servlets
all remaining
> the same but all site wide 404's in every directory be redirected to the
same servlet.
> im running tomcat 3.2.3...
> Thanks.
> -Ys-
>
> Find the best deals on the web at AltaVista Shopping!
> http://www.shopping.altavista.com
>
>

Reply via email to