>Number: 3832
>Category: mod_jserv
>Synopsis: JServ SSI v1.0 throws ClassCastException when calling
>non-HttpServlet Servlets
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jserv
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Thu Feb 4 06:50:00 PST 1999
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.3.4
>Environment:
JServ SSI v1.0
Probably any Java compiler, any platform.
JDk 1.1.6, uname -a: SunOS lsesun14 5.6 Generic sun4u sparc SUNW,Ultra-1,
Apache 1.3.4, JServ 1.0b, JServ SSI 1.0.
>Description:
JServ SSI v1.0 throws ClassCastException when the SERVLET tag of the
page it processes refers to a servlet which is not an HttpServlet
(but, let's say, a GenericServlet).
The exception is thrown in JServSSI.java, line 904, in member
void runServlet(ServletInfo info, ServletContext context,
HttpServletResponse res)
throws ServletException, IOException
>How-To-Repeat:
Take an HTML page with a SERVLET tag, change the servlet to be any servlet
extending let's say GenericServlet, load the page and see the exception
in the Page Source window of netscape.
>Fix:
Change JServSSI.java:904 from
HttpServlet servlet = (HttpServlet)context.getServlet(className);
to
Servlet servlet = context.getServlet(className);
thus removing the unnecessary cast.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]