You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Cardenas <da...@imaginart.es> on 2000/08/02 12:51:35 UTC
Intercepting 404 error
Hello.
Is it possible to intercept the 404 -page not found- error?
I am trying to intercept it and return a JSP page. Configuring Apache I
can return a static HTML page, but as soon as I try to point to a JSP
page, I get 'Not Found (404). Original request/foo'
I use Tomcat 3.2 beta 2 and Apache 1.3.12.
Thanks for your time.
-------------------------------------------------------------
Daniel Cárdenas <da...@imaginart.es>
Area de Internet
imaginArt Master Distributor
Via Augusta, 99 08006 Barcelona SPAIN
tel. (voice) : +34 93.2920770
fax : +34 93.2177651 http://www.imaginart.es
-------------------------------------------------------------
Re: Intercepting 404 error
Posted by tomcat <to...@piggy.linuxweb.org>.
MessageCheck out the ErrorDocument directive in apache.
You can replace a 404 with a user friendly page or run a script, etc. Or did I misunderstand your question?
You probably have to inform apache about .jsp pages as well.
----- Original Message -----
From: Yun Sang Jung
To: tomcat-user@jakarta.apache.org
Sent: Wednesday, August 02, 2000 10:13 PM
Subject: Re: Intercepting 404 error
Hello..
I have different opinion against your opinion. 404 error means "not found" not error page in Tomcat.
If I could catch 404 error, I think Tomcat or Apache should provide 404 error intercepting mechinism
on the product. IMFO, It seems that Daniel wants to customize 404 error message for his own.(am I right?)
for example, iPlanet webserver provides this mechinism to customize error message.
I'm not a expert about Tomcat and Apache. If there are experts about these products,
please share your knowlege with us.
Jung
>
> I believe you can set this using the directive in the
> context's web.xml file.
>
> -- Tom
>
> Daniel Cardenas wrote:
>
> > Hello.
> >
> > Is it possible to intercept the 404 -page not found- error?
> >
> > I am trying to intercept it and return a JSP page. Configuring Apache I
> > can return a static HTML page, but as soon as I try to point to a JSP
> > page, I get 'Not Found (404). Original request/foo'
> >
> > I use Tomcat 3.2 beta 2 and Apache 1.3.12.
> >
> > Thanks for your time.
> >
> > -------------------------------------------------------------
> > Daniel Cárdenas
> > Area de Internet
> > imaginArt Master Distributor
> > Via Augusta, 99 08006 Barcelona SPAIN
> > tel. (voice) : +34 93.2920770
> > fax : +34 93.2177651 http://www.imaginart.es
> > -------------------------------------------------------------
>
Re: Intercepting 404 error
Posted by Tom Parris <tm...@earthlink.net>.
Jung, Daniel:
Please look at:
<http://www.metronet.com/~wjm/tomcat/ToFeb11/msg01868.html>. It
describes the use of the <error-page> directive to catch 404 codes and
redirect them to a servlet or html file of your choosing. I'm sure you
can find more detailed descriptions in the Servlet API reference.
-- Tom
Yun Sang Jung wrote:
>
>
> [Image]
> Hello..
>
> I have different opinion against your opinion. 404 error means "not found" not error page in Tomcat.
> If I could catch 404 error, I think Tomcat or Apache should provide 404 error intercepting mechinism
> on the product. IMFO, It seems that Daniel wants to customize 404 error message for his own.(am I right?)
> for example, iPlanet webserver provides this mechinism to customize error message.
> I'm not a expert about Tomcat and Apache. If there are experts about these products,
> please share your knowlege with us.
>
> Jung
>
> >
> > I believe you can set this using the directive in the
> > context's web.xml file.
> >
> > -- Tom
> >
> > Daniel Cardenas wrote:
> >
> > > Hello.
> > >
> > > Is it possible to intercept the 404 -page not found- error?
> > >
> > > I am trying to intercept it and return a JSP page. Configuring Apache I
> > > can return a static HTML page, but as soon as I try to point to a JSP
> > > page, I get 'Not Found (404). Original request/foo'
> > >
> > > I use Tomcat 3.2 beta 2 and Apache 1.3.12.
> > >
> > > Thanks for your time.
> > >
> > > -------------------------------------------------------------
> > > Daniel Cárdenas
> > > Area de Internet
> > > imaginArt Master Distributor
> > > Via Augusta, 99 08006 Barcelona SPAIN
> > > tel. (voice) : +34 93.2920770
> > > fax : +34 93.2177651 http://www.imaginart.es
> > > -------------------------------------------------------------
> >
>
>
>
>
>
Re: Intercepting 404 error
Posted by Tom Parris <tm...@earthlink.net>.
I believe you can set this using the <error-page> directive in the
context's web.xml file.
-- Tom
Daniel Cardenas wrote:
> Hello.
>
> Is it possible to intercept the 404 -page not found- error?
>
> I am trying to intercept it and return a JSP page. Configuring Apache I
> can return a static HTML page, but as soon as I try to point to a JSP
> page, I get 'Not Found (404). Original request/foo'
>
> I use Tomcat 3.2 beta 2 and Apache 1.3.12.
>
> Thanks for your time.
>
> -------------------------------------------------------------
> Daniel Cárdenas <da...@imaginart.es>
> Area de Internet
> imaginArt Master Distributor
> Via Augusta, 99 08006 Barcelona SPAIN
> tel. (voice) : +34 93.2920770
> fax : +34 93.2177651 http://www.imaginart.es
> -------------------------------------------------------------