You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Manri Offermann <ma...@globalscale.net> on 2001/09/23 07:14:59 UTC

[TC4] exception error-page not working

I'm having trouble getting TC4 to display the error page specified
in web.xml when my servlet or jsp throws an Exception.

I just get the default HTTP 500 error page "A Servlet Exception Has
Occurred".
Below are the lines from web.xml.  What is wrong?

 <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/lib/err/exception.jsp</location>
 </error-page>
 <error-page>
    <exception-type>java.lang.IllegalArgumentException</exception-type>
    <location>/lib/err/exception.jsp</location>
 </error-page>

The target file contains:
<%@ page isErrorPage="true" %>

In Tomcat 3.2 this worked fine, but after upgrading to TC4 this doesn't work
anymore ...


manri



[TC4] error-page exception is null

Posted by Manri Offermann <ma...@globalscale.net>.
Hi,

I am trying to display a custom error page. Everything works fine, when
throwing errors from a JSP page, but when I throw an error from a Servlet,
the exception I receive on the error page is null. Why? The same code worked
on Tomcat 3.2

Test Servlet:
=======================================================
import java.io.IOException;

import javax.servlet.http.*;
import javax.servlet.*;

public class Test extends HttpServlet {
 public void service(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
  throw new ServletException("Test");
 }
}

web.xml:
=======================================================
 <error-page>
  <exception-type>javax.servlet.ServletException</exception-type>
  <location>/err.jsp</location>
 </error-page>
 <error-page>
  <exception-type>java.lang.Exception</exception-type>
  <location>/err.jsp</location>
 </error-page>


err.jsp:
=======================================================
<%@ page isErrorPage="true" %>

<%=exception%>   <---- is null from a servlet, and ok if from a JSP



manri



Re: Thawte, SSL, and Tomcat

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Jon Shoberg wrote:
> 
> Hypothetical situation ...
> 
>         I have the domain "secure.foobar.com" and a Thawte SSL certificate
> configured with Apache (mod_ssl).  The file provided back from Thawte is
> called "secure.foobar.com.crt".  Is there a way to use that certificate in
> setting up https://secure.foobar.com:8443/myWebApp/ ? Do I have to go back
> to Thawte for another cert if I want to provide SSL though tomcat?

Use a Apache/Tomcat connector like mod_jk.

> 
>         Does anyone have, literally, "blind instructions" for setting up a
> commercial SSL cert?  The current docs are pretty good but I am looking for
> something related to tomcat 3.x.x which covers creation and install of a
> commercial cert.
> 
> Thanks

Thawte, SSL, and Tomcat

Posted by Jon Shoberg <js...@cbd.net>.
Hypothetical situation ...

	I have the domain "secure.foobar.com" and a Thawte SSL certificate
configured with Apache (mod_ssl).  The file provided back from Thawte is
called "secure.foobar.com.crt".  Is there a way to use that certificate in
setting up https://secure.foobar.com:8443/myWebApp/ ? Do I have to go back
to Thawte for another cert if I want to provide SSL though tomcat?

	Does anyone have, literally, "blind instructions" for setting up a
commercial SSL cert?  The current docs are pretty good but I am looking for
something related to tomcat 3.x.x which covers creation and install of a
commercial cert.

Thanks



RE: [solution] installing *OFFICIAL (commercial)* SSL-certificate

Posted by Nick Torenvliet <to...@sympatico.ca>.
Just wondering are you running tomcat4.0 standalone?

P.S. Just want to let you know you are amazing!!!!

-----Original Message-----
From: pero [mailto:pero@antaramusic.de]
Sent: Sunday, September 23, 2001 3:08 AM
To: tomcat-user@jakarta.apache.org
Subject: [solution] installing *OFFICIAL (commercial)* SSL-certificate


Hi,

after long time of trying to setup a (demo)certificate from thawte.com or
trustcenter.de I finally made it. And because of the numerous questions on
this list concerning this topic, I thought it would be a good idea to share
my gained "wisdom" :-)
So what follows is a step-by-step instruction on how to install a commercial
(*not* self signed or openssl) certificate:
1. generate a local certificate:
   keytool -genkey -alias tomcat -keyalg RSA -keystore <myfile>
   where <myfile> is the name of the desired keystore-file
2. generate the CSR (you need it to request your (demo)certificate)
   keytool -certreq -keyalg RSA -alias tomcat -file certreq.pem -keystore
<myfile>
   now you have a file called "certreq.pem". Send this to your trustcenter.
3. most trustcenters do not deliver a so called "chained certificate",
   so you have to install their root-certificate (their website says where
to find it)
   keytool -import -alias root -keystore <myfile> -trustcacerts -file
<root-cert-file>
4. after your final (demo)certificate has been sent to you, install it like
this
   keytool -import -alias tomcat -keystore <myfile> -trustcacerts -file
<received-cert-file>

For the tomcat-specific part of the installation go to the *real good*
tomcat-doc-page:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/ssl-howto.html

I hope it helped somebody... If there are any questions/suggestions/etc...
simply hit "REPLY" (-:

greets,
pero


[solution] installing *OFFICIAL (commercial)* SSL-certificate

Posted by pero <pe...@antaramusic.de>.
Hi,

after long time of trying to setup a (demo)certificate from thawte.com or
trustcenter.de I finally made it. And because of the numerous questions on
this list concerning this topic, I thought it would be a good idea to share
my gained "wisdom" :-)
So what follows is a step-by-step instruction on how to install a commercial
(*not* self signed or openssl) certificate:
1. generate a local certificate:
   keytool -genkey -alias tomcat -keyalg RSA -keystore <myfile>
   where <myfile> is the name of the desired keystore-file
2. generate the CSR (you need it to request your (demo)certificate)
   keytool -certreq -keyalg RSA -alias tomcat -file certreq.pem -keystore
<myfile>
   now you have a file called "certreq.pem". Send this to your trustcenter.
3. most trustcenters do not deliver a so called "chained certificate",
   so you have to install their root-certificate (their website says where
to find it)
   keytool -import -alias root -keystore <myfile> -trustcacerts -file
<root-cert-file>
4. after your final (demo)certificate has been sent to you, install it like
this
   keytool -import -alias tomcat -keystore <myfile> -trustcacerts -file
<received-cert-file>

For the tomcat-specific part of the installation go to the *real good*
tomcat-doc-page:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/ssl-howto.html

I hope it helped somebody... If there are any questions/suggestions/etc...
simply hit "REPLY" (-:

greets,
pero


[solution] sudden JVM death on some linux systems

Posted by pero <pe...@antaramusic.de>.
Hi there,

I noticed several threads on this mailinglist dealing with "sudden tomcat
death". I sent some mails concerning this too some days ago. The problem was
that tomcat (4) died after a random amount of time. Most people came to the
conclusion that there must be something wrong with the JVM.
After trying and trying (way too long) and scanning the internet (for
days )-:) and Sun's Bug-Reports I found that some Linux-Distributions
(escpecially with 2.4 kernel) have problems with Sun's JVM (>= 1.3).
What helped in my case (SuSE 7.1: tomcat didn't work with *any* JDK - and I
tried *all*!) was decreasing the stack-size to 2M by adding "ulimit -s 2048"
to my startup-script (see
http://developer.java.sun.com/developer/bugParade/bugs/4466587.html).

perhaps this works for others too and they could live on with a little grin
knowing that their tomcat is running... and running... and running...

cheers,
pero

..: I *LOVE* [my] tomcat...


[solution] sudden JVM death on some linux systems

Posted by pero <pe...@antaramusic.de>.
Hi there,

I noticed several threads on this mailinglist dealing with "sudden tomcat
death". I sent some mails concerning this too some days ago. The problem was
that tomcat (4) died after a random amount of time. Most people came to the
conclusion that there must be something wrong with the JVM.
After trying and trying (way too long) and scanning the internet (for
days )-:) and Sun's Bug-Reports I found that some Linux-Distributions
(escpecially with 2.4 kernel) have problems with Sun's JVM (>= 1.3).
What helped in my case (SuSE 7.1: tomcat didn't work with *any* JDK - and I
tried *all*!) was decreasing the stack-size to 2M by adding "ulimit -s 2048"
to my startup-script (see
http://developer.java.sun.com/developer/bugParade/bugs/4466587.html).

perhaps this works for others too and they could live on with a little grin
knowing that their tomcat is running... and running... and running...

cheers,
pero

..: I *LOVE* [my] tomcat...