Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JSP compiler can't find apache classes?

7 views
Skip to first unread message

janne

unread,
Nov 20, 2003, 5:21:09 AM11/20/03
to
Hi,

I have a WebSphere V5 installation where I am trying to deploy an
.ear. While compiling the following errorpage:

<%@ page isErrorPage="true" %>
<html><head><title>errorPage.jsp</title></head>
<body>
<font color="red"><b>Exception was thrown</b></font>
<% if (exception != null) { %>
<p>Exception message = <b>"<%= exception.getMessage() %>"</b>
<% helper.Log.debug("Exception message: " + exception.getMessage());
%>
<p><p>Stacktrace = <p><%
ByteArrayOutputStream ostr = new ByteArrayOutputStream();
exception.printStackTrace(new PrintStream(ostr));
String stackTrace = ostr.toString();
%>
<%= stackTrace %>
<%
System.out.print("Exception stacktrace: " + stackTrace);
%>
<% } else { %>
There was no exception!
<% } %>
</body>
</html>

Jsp compiler gives errors:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred between lines: 8 and 12 in the jsp file:
/include/errorPage.jsp

Generated servlet error:
d:\websphere\temp\kp-lehtoti\server1\Testi_applicaatio\cd_web_application.war\include\_errorPage.java:92:
Class org.apache.jsp.ByteArrayOutputStream not found.
ByteArrayOutputStream ostr = new ByteArrayOutputStream();
^


An error occurred between lines: 8 and 12 in the jsp file:
/include/errorPage.jsp

Generated servlet error:
d:\websphere\temp\kp-lehtoti\server1\Testi_applicaatio\cd_web_application.war\include\_errorPage.java:92:
Class org.apache.jsp.ByteArrayOutputStream not found.
ByteArrayOutputStream ostr = new ByteArrayOutputStream();
^


An error occurred between lines: 8 and 12 in the jsp file:
/include/errorPage.jsp

Generated servlet error:
d:\websphere\temp\kp-lehtoti\server1\Testi_applicaatio\cd_web_application.war\include\_errorPage.java:93:
Class org.apache.jsp.PrintStream not found.
exception.printStackTrace(new PrintStream(ostr));
^
3 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:326)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.loadJSP(JspServlet.java:861)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:278)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled
Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:598)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)

What gives?

Deepak

unread,
Nov 24, 2003, 3:58:50 PM11/24/03
to
Looks like you are missing an import in your jsp. Just add this line
to your jsp and it should work ...

<%@page import="java.io.ByteArrayOutputStream" %>

0 new messages