You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Bernie <bh...@actrix.gen.nz> on 2000/11/10 23:40:01 UTC
Re: mod_jserv/6479: ServletException not logged when thrown from within init()
The following reply was made to PR mod_jserv/6479; it has been noted by GNATS.
From: Bernie <bh...@actrix.gen.nz>
To: gnats-admin@bugz.apache.org, jserv-bugdb@apache.org
Cc: <ap...@Apache.Org>
Subject: Re: mod_jserv/6479: ServletException not logged when thrown from within init()
Date: Sat, 11 Nov 2000 11:34:55 +1300
Marc Connolly <md...@us.oracle.com>
suggested in java-apache-users@list.working-dogs.com
on Date: Fri, 25 Aug 2000 23:13:31 -0400
Found an appropriate place to put a quick hack (JServServletManager
- >
loadStartupServlets) as folllows:
Original
=3D=3D=3D=3D=3D=3D=3D=3D
private void loadStartupServlets(JServSendError se) {
if (startups =3D=3D null) {
return;
}
for(int i =3D 0; i < startups.length; i++) {
String servname =3D startups[i];
if (servname =3D=3D null) {
continue;
}
try {
loadServlet(servname, se);
} catch (ServletException initError) {
se.sendError(initError); <----
this guy was
doing nothing
}
}
}
Hack
=3D=3D=3D=3D=3D=3D=3D=3D
private void loadStartupServlets(JServSendError se) {
if (startups =3D=3D null) {
return;
}
for(int i =3D 0; i < startups.length; i++) {
String servname =3D startups[i];
if (servname =3D=3D null) {
continue;
}
try {
loadServlet(servname, se);
} catch (ServletException initError) {
JServ.log.log(CH_SERVLET_EXCEPTION,
"(loadStartupServlets)
initialization failed for servlet: '"
+ servname + "'; initError.getMessage()=3D" +
initError.getMessage());
se.sendError(initError); // leave him in for now...
}
}
}