Hi,
I am using Tomcat4.0.4, jdk1.4. I have a simple jsp file like this
package org.apache.jsp;
import javax.servlet.*;
import java.sql.*;
import java.util.Vector;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class testbean$jsp extends HttpJspBase {
// begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(30,0);to=(30,78)]
// end
static {
}
public testbean$jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws
org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse
response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;ISO-8859-1");
pageContext = _jspxFactory.getPageContext(this, request,
response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(0,0);to=(13,0)]
out.write("<!-- Developed and Documented by Krishna
Veeramachaneni -->\r\n<html>\r\n\r\n<head>\r\n<title>IMEDGE Content
Management Services Administrator</title>\r\n<link
href=\"/JSP/com/imedge/admin/style.css\" rel=\"stylesheet\"
type=\"text/css\" >\r\n<script language=\"JavaScript\"
src=\"/JSP/com/imedge/admin/validation.js\"></script>\r\n<script
language=\"JavaScript\"
src=\"/JSP/com/imedge/admin/CascadeMenu.js\"></script>\r\n<script language =
\"JavaScript\">\r\n\r\n</script>\r\n</head>\r\n\r\n");
// end
// begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(13,2);to=(19,0)]
/* Java code to retrieve family name and description if
any */
// end
// HTML // begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(19,2);to=(23,0)]
out.write("\r\n<body link=\"#990000\" vlink=\"#009999\"
alink=\"#009999\" \r\nID=\"Bdy\" leftmargin=\"0\" rightmargin=\"0\"
topmargin=\"0\" bgcolor=\"beige\" >\r\n\r\n");
// end
// HTML // begin
[file="/JSP/com/imedge/admin/Banner.jsp";from=(0,0);to=(21,8)]
out.write("\r\n<table cellpadding=0
cellspacing=0>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\" align=\"left\"
border=\"0\" width=299 >\r\n\t\t\t\t<a href=\"#\"
onClick=\"javascript:window.open('http://www.edge.com', 'edgewindow') \"
>\r\n\r\n \t\t\t\t<IMG align=top border=0 height=90
src=\"/JSP/com/imedge/admin/images/hmb_edge.gif\" width=299
/>\r\n\t\t\t\t</a>\r\n\t\t\t</td>\r\n\t\t\t<td valign=\"top\"
align=\"left\" border=\"0\" >\r\n\t\t\t\t<a href=\"#\"
onClick=\"javascript:window.open('http://www.edge.com', 'edgewindow') \"
>\r\n \t\t\t\t<IMG align=top border=0 height=90
src=\"/JSP/com/imedge/admin/images/hmb_mont.jpg\" width=299
/>\r\n\t\t\t\t</a>\r\n\t\t\t</td>\r\n\r\n\t\t\t<td valign=\"center\"
align=\"right\" width=\"65%\" bgcolor=\"#990000\"
border=\"0\">\r\n\t\t\t\t<font size=\"3\" color=\"white\"><b>IMEDGE Content
Management Services Administrator
</b></font>\r\n\t\t\t</td>\r\n\r\n\t\t</tr>\r\n\r\n</table
>");
// end
// HTML // begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(23,54);to=(24,0)]
out.write("\r\n");
// end
// HTML // begin
[file="/JSP/com/imedge/admin/FamilyMenu.jsp";from=(0,0);to=(48,8)]
out.write("<!-- Developed and documented by Krishna
Veeramachaneni --> \r\n<table cellspacing=\"0\"
cellpadding=\"0\">\r\n\t<tr>\r\n\t\t<td>\r\n\t\t\t<a href=\"#\"
onClick=\"this.href='/JSP/com/imedge/admin/IMOmMain.htm'\">\r\n\t\t\t<IMG
src=\"/JSP/com/imedge/admin/images/HomeInactive.gif\" name=\"HomeButton\"
border=\"0\"\r\n\t\t\ttitle=\"Imedge Volume Managar Home
Page\"\r\n\t\t\tOnMouseover=\"document.HomeButton.src='/JSP/com/imedge/admin
/images/HomeHighlighted.gif';\"\r\n\t\t\tonmouseout=\"document.HomeButton.sr
c='/JSP/com/imedge/admin/images/HomeInactive.gif';\"\r\n\t\t\t>
</a>\r\n\t\t\t\r\n\t\t\t\r\n\t\t</td>\r\n\t\t<td>\r\n\t\t\t<a href=\"#\"
onClick=\"this.href='/JSP/com/imedge/admin/FamilyMain.jsp'\"> \r\n\t\t\t<IMG
src=\"/JSP/com/imedge/admin/images/FamilyActive.gif\" name=\"FamilyButton\"
border=\"0\"\r\n\t\t\ttitle=\"Create, Edit, Delete
Family\"\r\n\t\t\tOnMouseover=\"document.FamilyButton.src='/JSP/com/imedge/a
dmin/images/FamilyHighlighted.gif';\"\r\n\t\t\tonmouseout=\"document.FamilyB
utton.src='/JSP/com/imedge/admin/images/FamilyActive.gif';\"\r\n\t\t\t>
</A>\r\n\t\t</td>\r\n\t\t<td>\r\n\t\t\t<a href=\"#\"
onClick=\"this.href='/JSP/com/imedge/admin/VolumeMain.jsp'\">\r\n\t\t\t<IMG
src=\"/JSP/com/imedge/admin/images/VolumeInactive.gif\"
name=\"VolumeButton\" border=\"0\"\r\n\t\t\ttitle=\"Create, Edit, Delete
Volume\"
\r\n\t\t\tOnMouseover=\"document.VolumeButton.src='/JSP/com/imedge/admin/ima
ges/VolumeHighlighted.gif';\"\r\n\t\t\tonmouseout=\"document.VolumeButton.sr
c='/JSP/com/imedge/admin/images/VolumeInactive.gif';\"\r\n\t\t\t>
</A>\r\n\r\n\t\t</td>\r\n\t\t<td>\r\n\t\t\t<a href=\"#\"
onClick=\"this.href='/JSP/com/imedge/admin/ObjectMain.jsp'\">\r\n\t\t\t<IMG
src=\"/JSP/com/imedge/admin/images/objectsinactive.gif\"
name=\"ObjectButton\" border=\"0\"\r\n\t\t\ttitle=\"Display Object info\"
\r\n\t\t\tOnMouseover=\"document.ObjectButton.src='/JSP/com/imedge/admin/ima
ges/objectshighlighted.gif';\"\r\n\t\t\tonmouseout=\"document.ObjectButton.s
rc='/JSP/com/imedge/admin/images/objectsinactive.gif';\"\r\n\t\t\t>
</A>\r\n\r\n\t\t</td>\r\n\t\t<td>\r\n\t\t\t<IMG
src=\"/JSP/com/imedge/admin/images/HelpInactive.gif\" name=\"HelpButton\"
\r\n\t\t\ttitle=\"Help\"\r\n\t\t\tOnMouseover=\"document.HelpButton.src='/JS
P/com/imedge/admin/images/HelpHighlighted.gif';\"\r\n\t\t\tonmouseout=\"docu
ment.HelpButton.src='/JSP/com/imedge/admin/images/HelpInactive.gif';\">\r\n\
t\t</td>\r\n\t\t\r\n\t\t\r\n\t</tr>\r\n</table>");
// end
// HTML // begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(24,57);to=(26,0)]
out.write("\r\n\r\n");
// end
// HTML // begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(26,36);to=(27,0)]
out.write("\r\n");
// end
// HTML // begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(27,31);to=(28,0)]
out.write("\r\n");
// end
// HTML // begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(28,37);to=(30,0)]
out.write("\r\n\r\n");
// end
// begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(30,0);to=(30,78)]
com.imedge.admin.Employee dbbean = null;
boolean _jspx_specialdbbean = false;
synchronized (session) {
dbbean= (com.imedge.admin.Employee)
pageContext.getAttribute("dbbean",PageContext.SESSION_SCOPE);
if ( dbbean == null ) {
_jspx_specialdbbean = true;
try {
dbbean = (com.imedge.admin.Employee)
java.beans.Beans.instantiate(this.getClass().getClassLoader(),
"com.imedge.admin.Employee");
} catch (ClassNotFoundException exc) {
throw new
InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create
bean of class "+"com.imedge.admin.Employee", exc);
}
pageContext.setAttribute("dbbean", dbbean,
PageContext.SESSION_SCOPE);
}
}
if(_jspx_specialdbbean == true) {
// end
// HTML // begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(28,37);to=(30,0)]
out.write("\r\n \r\n");
// end
// begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(30,0);to=(30,78)]
}
// end
// HTML // begin
[file="/JSP/com/imedge/admin/testbean.jsp";from=(32,14);to=(39,7)]
out.write("\r\n\r\n\r\n\t\t\r\n\r\n</body>\r\n\r\n</html>");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null)
_jspxFactory.releasePageContext(pageContext);
}
}
}
And this source is generated by jsp file. But when I use javac to compile
this source code, I have the following error:
C:\Tomcat 4.0\webapps\ROOT\JSP>javac testbean$jsp.java
Testbean$jsp.java:24: cannot resolve symbol
Symbol : class JspException
Public final void _jspx_int() throws org.apache.jasper.runtime.JspException
{ ^
testbean$jsp.java:137 handlePageException(java.lang.Exception) in
Javaxservlet.jsp.PageContext cannot be applied to (java.lang.Throwable)
if (pageContext != null)
pageContext.handlePageException(t);
2 errors
Does anyone know what is wrong here?
Thank you
Eddie Liang
Database Architect
Phone: 630-810-9669 x253