LeanMoreTryMore
asked on
simple JSP page not recognize the Database.java class - Failed to connect to the Oracle database
I have modified the server.xml and created a simple JSP page for testing database connection but I got the following error.
Please advise and correct my mistake
Error
========================== ========== ========== ========== ========== ========== =
HTTP Status 500 -
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperEx ception: Unable to compile class for JSP
An error occurred at line: 2 in the jsp file: /DBTest.jsp <=======* Failed to recognize the Database.java **
Generated servlet error:
Syntax error on token "Invalid Character", delete this token
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Syntax error on token "Invalid Character", delete this token
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Syntax error on token "Invalid Character", delete this token
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Syntax error on token "Invalid Character", delete this token
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Syntax error on tokens, delete these tokens
org.apache.jasper.compiler .DefaultEr rorHandler .javacErro r(DefaultE rrorHandle r.java:84)
org.apache.jasper.compiler .ErrorDisp atcher.jav acError(Er rorDispatc her.java:3 28)
org.apache.jasper.compiler .JDTCompil er.generat eClass(JDT Compiler.j ava:397)
org.apache.jasper.compiler .Compiler. compile(Co mpiler.jav a:288)
org.apache.jasper.compiler .Compiler. compile(Co mpiler.jav a:267)
org.apache.jasper.compiler .Compiler. compile(Co mpiler.jav a:255)
========================== ========== ========== ========== ========== ========== =
DBTest.jsp
========================== ========== ========== ========== ========== =========
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*, AAPL.*" errorPage="" %>
<% Database db = new Database();
db.makeConnection();
Connection con = db.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT employee_no, task_desc FROM em_queue");
if (rs !=null) {
while (rs.next()) {
String EmployeeNo = rs.getString("employee_no" );
String TaskDesc = rs.getString("task_desc");
}
}
%>
========================== ========== ========== ========== ========== ========== ==
server.xml
=======
<!-- Example Server Configuration File -->
<Server port="8005" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.cata lina.mbean s.ServerLi fecycleLis tener" />
<Listener className="org.apache.cata lina.mbean s.GlobalRe sourcesLif ecycleList ener" />
<Listener className="org.apache.cata lina.store config.Sto reConfigLi fecycleLis tener"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina. UserDataba se"
description="User database that can be updated and saved"
factory="org.apache.catali na.users.M emoryUserD atabaseFac tory"
pathname="conf/tomcat-user s.xml" />
</GlobalNamingResources>
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector
port="8090" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true " />
<!-- Note : To disable connection timeouts, set connectionTimeout value to 0 -->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<Context path="/AAPL" docBase="AAPL"
debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.cata lina.logge r.FileLogg er"
prefix="localhost_DBTest_l og." suffix=".txt"
timestamp="true"/>
<Resource name="jdbc/myoracle"
auth="Container"
type="javax.sql.DataSource "/>
<ResourceParams name="jdbc/myoracle">
<parameter>
<name>factory</name>
<value>org.apache.commons. dbcp.Basic DataSource Factory</v alue>
</parameter>
<!-- Class name for mm.mysql JDBC driver -->
<parameter>
<name>driverClassName</nam e>
<value>oracle.jdbc.OracleD river</val ue>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:gu idev@137.1 72.40.107: 1521:gdev< /value>
</parameter>
<!-- MySQL dB username and password for dB connections -->
<parameter>
<name>username</name>
<value>guidev</value>
</parameter>
<parameter>
<name>password</name>
<value>guidev</value>
</parameter>
<!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>0</value>
</parameter>
<parameter>
<name>removeAbandoned</nam e>
<value>true</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>0</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
</Context>
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.cata lina.realm .UserDatab aseRealm"
resourceName="UserDatabase "/>
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.cata lina.realm .MemoryRea lm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.cata lina.realm .JDBCRealm "
driverName="oracle.jdbc.dr iver.Oracl eDriver"
connectionURL="jdbc:oracle :thin:@nts erver:1521 :ORCL"
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.cata lina.realm .JDBCRealm "
driverName="sun.jdbc.odbc. JdbcOdbcDr iver"
connectionURL="jdbc:odbc:C ATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!--
<Cluster className="org.apache.cata lina.clust er.tcp.Sim pleTcpClus ter"
managerClassName="org.apac he.catalin a.cluster. session.De ltaManager "
expireSessionsOnShutdown=" false"
useDirtyFlag="true"
notifyListenersOnReplicati on="true">
<Membership
className="org.apache.cata lina.clust er.mcast.M castServic e"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.cata lina.clust er.tcp.Rep licationLi stener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.cata lina.clust er.tcp.Rep licationTr ansmitter"
replicationMode="pooled"
ackTimeout="15000"/>
<Valve className="org.apache.cata lina.clust er.tcp.Rep licationVa lve"
filter=".*\.gif;.*\.js;.*\ .jpg;.*\.h tm;.*\.htm l;.*\.txt; "/>
<Deployer className="org.apache.cata lina.clust er.deploy. FarmWarDep loyer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy /"
watchDir="/tmp/war-listen/ "
watchEnabled="false"/>
</Cluster>
-->
</Host>
</Engine>
</Service>
</Server>
========================== ========== ========== ========== ========== ========== ==
Database.Java
=========
package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD river;
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
DriverManager.registerDriv er(new OracleDriver());
con = DriverManager.getConnectio n("jdbc:or acle:thin: @137.172.4 0.107:gdev ", "guidev", "guidev");
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
========================== ========== ========== ========== ========== ========
structure of the Web Appl
Tomcat HOME
webapps
AAPL -- DBTest.jsp page here
css
image
WEB-INF
classes
AAPL -- Database.class here
===
Please help as I've already spend more than 5 hours still not working it out the problem
Please advise and correct my mistake
Error
==========================
HTTP Status 500 -
--------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperEx
An error occurred at line: 2 in the jsp file: /DBTest.jsp <=======* Failed to recognize the Database.java **
Generated servlet error:
Syntax error on token "Invalid Character", delete this token
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Syntax error on token "Invalid Character", delete this token
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Syntax error on token "Invalid Character", delete this token
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Syntax error on token "Invalid Character", delete this token
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Syntax error on tokens, delete these tokens
org.apache.jasper.compiler
org.apache.jasper.compiler
org.apache.jasper.compiler
org.apache.jasper.compiler
org.apache.jasper.compiler
org.apache.jasper.compiler
==========================
DBTest.jsp
==========================
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*, AAPL.*" errorPage="" %>
<% Database db = new Database();
db.makeConnection();
Connection con = db.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT employee_no, task_desc FROM em_queue");
if (rs !=null) {
while (rs.next()) {
String EmployeeNo = rs.getString("employee_no"
String TaskDesc = rs.getString("task_desc");
}
}
%>
==========================
server.xml
=======
<!-- Example Server Configuration File -->
<Server port="8005" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.cata
<Listener className="org.apache.cata
<Listener className="org.apache.cata
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.
description="User database that can be updated and saved"
factory="org.apache.catali
pathname="conf/tomcat-user
</GlobalNamingResources>
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector
port="8090" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true
<!-- Note : To disable connection timeouts, set connectionTimeout value to 0 -->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<Context path="/AAPL" docBase="AAPL"
debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.cata
prefix="localhost_DBTest_l
timestamp="true"/>
<Resource name="jdbc/myoracle"
auth="Container"
type="javax.sql.DataSource
<ResourceParams name="jdbc/myoracle">
<parameter>
<name>factory</name>
<value>org.apache.commons.
</parameter>
<!-- Class name for mm.mysql JDBC driver -->
<parameter>
<name>driverClassName</nam
<value>oracle.jdbc.OracleD
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:gu
</parameter>
<!-- MySQL dB username and password for dB connections -->
<parameter>
<name>username</name>
<value>guidev</value>
</parameter>
<parameter>
<name>password</name>
<value>guidev</value>
</parameter>
<!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>0</value>
</parameter>
<parameter>
<name>removeAbandoned</nam
<value>true</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>0</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
</Context>
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.cata
resourceName="UserDatabase
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.cata
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.cata
driverName="oracle.jdbc.dr
connectionURL="jdbc:oracle
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles"
-->
<!--
<Realm className="org.apache.cata
driverName="sun.jdbc.odbc.
connectionURL="jdbc:odbc:C
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles"
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!--
<Cluster className="org.apache.cata
managerClassName="org.apac
expireSessionsOnShutdown="
useDirtyFlag="true"
notifyListenersOnReplicati
<Membership
className="org.apache.cata
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.cata
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.cata
replicationMode="pooled"
ackTimeout="15000"/>
<Valve className="org.apache.cata
filter=".*\.gif;.*\.js;.*\
<Deployer className="org.apache.cata
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy
watchDir="/tmp/war-listen/
watchEnabled="false"/>
</Cluster>
-->
</Host>
</Engine>
</Service>
</Server>
==========================
Database.Java
=========
package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
DriverManager.registerDriv
con = DriverManager.getConnectio
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
==========================
structure of the Web Appl
Tomcat HOME
webapps
AAPL -- DBTest.jsp page here
css
image
WEB-INF
classes
AAPL -- Database.class here
===
Please help as I've already spend more than 5 hours still not working it out the problem
don't think its not recognising your Database class, looks more like theres a crappy character in there somewhere.
ASKER
as indicated at line 2 I can't see any crappy character as you can see below, except it calls Database()
<% Database db = new Database();
<% Database db = new Database();
try deleteing and retyping the line.
or even trying to load it with *just* the first line and see if that runs.
if so add a line at a time to pinpoint the problem.
or even trying to load it with *just* the first line and see if that runs.
if so add a line at a time to pinpoint the problem.
ASKER
You are right. Getting better BUT
When I re-type the whole lot and change the first line like below
<%@ page contentType="text/html;cha rset=windo ws-1252" language="java" import="java.sql.*" import="AAPL.*"%>
nOTES: i have seperated two for import java.sql and AAPL
I also got the compilation warning but it lets me run
Compilation Error stating that
Warning(1,1): package name AAPL does not match source file name C:\JDeveloper10g\jdev\mywo rk\WebServ erAAPL\Vie w\src\Data base.java
AND run it again but I got different error like below:
500 Internal Server Error
java.sql.SQLException: Io exception: Invalid connection string format, a valid format is: "host:port:sid" at oracle.jdbc.driver.Databas eError.thr owSqlExcep tion(Datab aseError.j ava:137) at oracle.jdbc.driver.Databas eError.thr owSqlExcep tion(Datab aseError.j ava:174) at oracle.jdbc.driver.Databas eError.thr owSqlExcep tion(Datab aseError.j ava:286) at oracle.jdbc.driver.T4CConn ection.log on(T4CConn ection.jav a:321) at oracle.jdbc.driver.Physica lConnectio n.<init>(P hysicalCon nection.ja va:414) at oracle.jdbc.driver.T4CConn ection.<in it>(T4CCon nection.ja va:149) at oracle.jdbc.driver.T4CDriv erExtensio n.getConne ction(T4CD riverExten sion.java: 31) at oracle.jdbc.driver.OracleD river.conn ect(Oracle Driver.jav a:551) at java.sql.DriverManager.get Connection (DriverMan ager.java: 512) at java.sql.DriverManager.get Connection (DriverMan ager.java: 171) at Database.makeConnection(Da tabase.jav a:15)
I think the java program Database IS CORRECT
========
package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD river;
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
DriverManager.registerDriv er(new OracleDriver());
con = DriverManager.getConnectio n("jdbc:or acle:thin: @137.172.4 0.107:gdev ", "guidev", "guidev");
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
When I re-type the whole lot and change the first line like below
<%@ page contentType="text/html;cha
nOTES: i have seperated two for import java.sql and AAPL
I also got the compilation warning but it lets me run
Compilation Error stating that
Warning(1,1): package name AAPL does not match source file name C:\JDeveloper10g\jdev\mywo
AND run it again but I got different error like below:
500 Internal Server Error
java.sql.SQLException: Io exception: Invalid connection string format, a valid format is: "host:port:sid" at oracle.jdbc.driver.Databas
I think the java program Database IS CORRECT
========
package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
DriverManager.registerDriv
con = DriverManager.getConnectio
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
> con = DriverManager.getConnectio n("jdbc:or acle:thin: @137.172.4 0.107:gdev ", "guidev", "guidev");
your missing the port, should be "host:port:sid"
your missing the port, should be "host:port:sid"
ASKER
Thanks objects
I have changed to
package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD river;
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
String dbConn = "jdbc:oracle:thin:guidev/g uidev@137. 172.40.107 :1521:gdev ";
DriverManager.registerDriv er(new oracle.jdbc.driver.OracleD river());
Connection conn;
conn = DriverManager.getConnectio n (dbConn);
//con = DriverManager.getConnectio n("jdbc:or acle:thin: @137.172.4 0.107:1521 :gdev", "guidev", "guidev");
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
===
But I got compliation error stating that
Error(5,8): duplicate definition of class AAPL.Database
I dont get the above error before I changed. Please advise
I have changed to
package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
String dbConn = "jdbc:oracle:thin:guidev/g
DriverManager.registerDriv
Connection conn;
conn = DriverManager.getConnectio
//con = DriverManager.getConnectio
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
===
But I got compliation error stating that
Error(5,8): duplicate definition of class AAPL.Database
I dont get the above error before I changed. Please advise
> C:\JDeveloper10g\jdev\mywo rk\WebServ erAAPL\Vie w\src\Data base.java
noticed that the .java should be in an AAPL directory to match the package
this may be creating the problem.
noticed that the .java should be in an AAPL directory to match the package
this may be creating the problem.
ASKER
Thanks object,
Both the sample.jsp page and Database.java works well inside the JDeveloper10g.
But
When I copy
the DBTest.jsp to $TOMCAT_HOME\webapps\AAPL
and
the Database.class to $TOMCAT_HOME\webapps\AAPL\ WEB-INF\cl asses
I got the following error
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperEx ception: Unable to compile class for JSP
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Database cannot be resolved or is not a type
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Database cannot be resolved or is not a type
org.apache.jasper.compiler .DefaultEr rorHandler .javacErro r(DefaultE rrorHandle r.java:84)
org.apache.jasper.compiler .ErrorDisp atcher.jav acError(Er rorDispatc her.java:3 28)
org.apache.jasper.compiler .JDTCompil er.generat eClass(JDT Compiler.j ava:397)
org.apache.jasper.compiler .Compiler. compile(Co mpiler.jav a:288)
========================== ========== ========== ========== ==========
I think DBTest.jsp can't find the Database.class
Please advise
Both the sample.jsp page and Database.java works well inside the JDeveloper10g.
But
When I copy
the DBTest.jsp to $TOMCAT_HOME\webapps\AAPL
and
the Database.class to $TOMCAT_HOME\webapps\AAPL\
I got the following error
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperEx
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Database cannot be resolved or is not a type
An error occurred at line: 2 in the jsp file: /DBTest.jsp
Generated servlet error:
Database cannot be resolved or is not a type
org.apache.jasper.compiler
org.apache.jasper.compiler
org.apache.jasper.compiler
org.apache.jasper.compiler
==========================
I think DBTest.jsp can't find the Database.class
Please advise
> the Database.class to $TOMCAT_HOME\webapps\AAPL\ WEB-INF\cl asses
Database.class should be in:
$TOMCAT_HOME\webapps\AAPL\ WEB-INF\cl asses\AAPL
(because it is in the AAPL package)
Database.class should be in:
$TOMCAT_HOME\webapps\AAPL\
(because it is in the AAPL package)
ASKER
Sorry object, forgot to mention this. Yesterday once I received your advise, I try to remove the package in the Database.java. To make it easy,
//package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD river;
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
DriverManager.registerDriv er(new OracleDriver());
System.out.println("before Inside make connection");
con = DriverManager.getConnectio n("jdbc:or acle:thin: @137.172.4 0.107:1521 :gdev", "guidev", "guidev");
System.out.println("Inside make connection");
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
DBTest.jsp
=======
<%@ page contentType="text/html;cha rset=windo ws-1252" language="java" import="java.sql.*" %>
<%
Database db = new Database();
db.makeConnection();
Connection con = db.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT to_char(sysdate,'dd/mm/yyy y') today FROM dual");
if (rs !=null) {
while (rs.next()) {
String EmployeeNo = rs.getString("today");
}
}
%>
In the first line, I just import java.sql.*, because the database resides in the current folder, i run the DBTest page, it works inside the JDeveloper10g
//package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
DriverManager.registerDriv
System.out.println("before
con = DriverManager.getConnectio
System.out.println("Inside
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
DBTest.jsp
=======
<%@ page contentType="text/html;cha
<%
Database db = new Database();
db.makeConnection();
Connection con = db.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT to_char(sysdate,'dd/mm/yyy
if (rs !=null) {
while (rs.next()) {
String EmployeeNo = rs.getString("today");
}
}
%>
In the first line, I just import java.sql.*, because the database resides in the current folder, i run the DBTest page, it works inside the JDeveloper10g
tomact requires packages, it won't find classin the default package
ASKER
does that mean i need to make it as a jar file
ASKER
I make a Database.jar file and copy to $TOMCAT_HOME/webapps/AAPL
Do i need to change the server.xml and web.xml files?
Do i need to change the server.xml and web.xml files?
> does that mean i need to make it as a jar file
not necessary
> Do i need to change the server.xml and web.xml files?
If they reference the Database class then you need to use the correct (fully qualified) class name
not necessary
> Do i need to change the server.xml and web.xml files?
If they reference the Database class then you need to use the correct (fully qualified) class name
ASKER
YOu said , "they reference the Database class then you need to use the correct (fully qualified) class name"
Does "THEY" mean the JSP pages?
yes. DBTest is referencing the Database.class to be used to connect the database.
server.xml
=======
<!-- Example Server Configuration File -->
<Server port="8005" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.cata lina.mbean s.ServerLi fecycleLis tener" />
<Listener className="org.apache.cata lina.mbean s.GlobalRe sourcesLif ecycleList ener" />
<Listener className="org.apache.cata lina.store config.Sto reConfigLi fecycleLis tener"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina. UserDataba se"
description="User database that can be updated and saved"
factory="org.apache.catali na.users.M emoryUserD atabaseFac tory"
pathname="conf/tomcat-user s.xml" />
</GlobalNamingResources>
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector
port="8090" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true " />
<!-- Note : To disable connection timeouts, set connectionTimeout value to 0 -->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<Context path="/AAPL" docBase="AAPL" <************** Change here, isn't it ****>
debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.cata lina.logge r.FileLogg er"
prefix="localhost_DBTest_l og." suffix=".txt"
timestamp="true"/>
<Resource name="jdbc/myoracle"
auth="Container"
type="javax.sql.DataSource "/>
<ResourceParams name="jdbc/myoracle">
<parameter>
<name>factory</name>
<value>org.apache.commons. dbcp.Basic DataSource Factory</v alue>
</parameter>
<!-- Class name for mm.mysql JDBC driver -->
<parameter>
<name>driverClassName</nam e>
<value>oracle.jdbc.OracleD river</val ue>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:gu idev@137.1 72.40.107: 1521:gdev< /value>
</parameter>
<!-- MySQL dB username and password for dB connections -->
<parameter>
<name>username</name>
<value>guidev</value>
</parameter>
<parameter>
<name>password</name>
<value>guidev</value>
</parameter>
<!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>0</value>
</parameter>
<parameter>
<name>removeAbandoned</nam e>
<value>true</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>0</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
</Context>
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.cata lina.realm .UserDatab aseRealm"
resourceName="UserDatabase "/>
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.cata lina.realm .MemoryRea lm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.cata lina.realm .JDBCRealm "
driverName="oracle.jdbc.dr iver.Oracl eDriver"
connectionURL="jdbc:oracle :thin:@nts erver:1521 :ORCL"
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.cata lina.realm .JDBCRealm "
driverName="sun.jdbc.odbc. JdbcOdbcDr iver"
connectionURL="jdbc:odbc:C ATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!--
<Cluster className="org.apache.cata lina.clust er.tcp.Sim pleTcpClus ter"
managerClassName="org.apac he.catalin a.cluster. session.De ltaManager "
expireSessionsOnShutdown=" false"
useDirtyFlag="true"
notifyListenersOnReplicati on="true">
<Membership
className="org.apache.cata lina.clust er.mcast.M castServic e"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.cata lina.clust er.tcp.Rep licationLi stener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.cata lina.clust er.tcp.Rep licationTr ansmitter"
replicationMode="pooled"
ackTimeout="15000"/>
<Valve className="org.apache.cata lina.clust er.tcp.Rep licationVa lve"
filter=".*\.gif;.*\.js;.*\ .jpg;.*\.h tm;.*\.htm l;.*\.txt; "/>
<Deployer className="org.apache.cata lina.clust er.deploy. FarmWarDep loyer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy /"
watchDir="/tmp/war-listen/ "
watchEnabled="false"/>
</Cluster>
-->
</Host>
</Engine>
</Service>
</Server>
========================== ========== ========== ========== ========== =========
Tomcat is so difficult to understand
Does "THEY" mean the JSP pages?
yes. DBTest is referencing the Database.class to be used to connect the database.
server.xml
=======
<!-- Example Server Configuration File -->
<Server port="8005" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.cata
<Listener className="org.apache.cata
<Listener className="org.apache.cata
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.
description="User database that can be updated and saved"
factory="org.apache.catali
pathname="conf/tomcat-user
</GlobalNamingResources>
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector
port="8090" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true
<!-- Note : To disable connection timeouts, set connectionTimeout value to 0 -->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<Context path="/AAPL" docBase="AAPL" <************** Change here, isn't it ****>
debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.cata
prefix="localhost_DBTest_l
timestamp="true"/>
<Resource name="jdbc/myoracle"
auth="Container"
type="javax.sql.DataSource
<ResourceParams name="jdbc/myoracle">
<parameter>
<name>factory</name>
<value>org.apache.commons.
</parameter>
<!-- Class name for mm.mysql JDBC driver -->
<parameter>
<name>driverClassName</nam
<value>oracle.jdbc.OracleD
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:gu
</parameter>
<!-- MySQL dB username and password for dB connections -->
<parameter>
<name>username</name>
<value>guidev</value>
</parameter>
<parameter>
<name>password</name>
<value>guidev</value>
</parameter>
<!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>0</value>
</parameter>
<parameter>
<name>removeAbandoned</nam
<value>true</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>0</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
</Context>
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.cata
resourceName="UserDatabase
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.cata
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.cata
driverName="oracle.jdbc.dr
connectionURL="jdbc:oracle
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles"
-->
<!--
<Realm className="org.apache.cata
driverName="sun.jdbc.odbc.
connectionURL="jdbc:odbc:C
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles"
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!--
<Cluster className="org.apache.cata
managerClassName="org.apac
expireSessionsOnShutdown="
useDirtyFlag="true"
notifyListenersOnReplicati
<Membership
className="org.apache.cata
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.cata
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.cata
replicationMode="pooled"
ackTimeout="15000"/>
<Valve className="org.apache.cata
filter=".*\.gif;.*\.js;.*\
<Deployer className="org.apache.cata
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy
watchDir="/tmp/war-listen/
watchEnabled="false"/>
</Cluster>
-->
</Host>
</Engine>
</Service>
</Server>
==========================
Tomcat is so difficult to understand
> Does "THEY" mean the JSP pages?
No I meant your xml config, but I can't see where Database class is mentioned anywhere in there.
No I meant your xml config, but I can't see where Database class is mentioned anywhere in there.
ASKER
Do I need to specify in server.xml file? I didnt put in here.
it does not make any sense to me. let's say if i have hundred java class files, this means i have to add hundred entries to the server.xml. I have spent alot of time reading tomcat, they dont say that.
But all the information I found from different web sites including EE, only cover Tomcat V3, or V4. I use Tomcat latest version 5.5, this is very different.
Do you have Tomcat 5.5 installed on your pc? if yes, how do u set up to connect the database. I think it needs to set up in the JNDI.. If I dont work out Apache Tomcat I have to report to our manager. The reason I thought it is good to start using Tomcat is free.
I thought i only have to specify the webdoc path like below, it will pick up all the class file under $TOMCAT_HOME/webappl/AAPL
<Context path="/AAPL" docBase="AAPL" <************** Change here, isn't it ****>
debug="5" reloadable="true" crossContext="true">
it does not make any sense to me. let's say if i have hundred java class files, this means i have to add hundred entries to the server.xml. I have spent alot of time reading tomcat, they dont say that.
But all the information I found from different web sites including EE, only cover Tomcat V3, or V4. I use Tomcat latest version 5.5, this is very different.
Do you have Tomcat 5.5 installed on your pc? if yes, how do u set up to connect the database. I think it needs to set up in the JNDI.. If I dont work out Apache Tomcat I have to report to our manager. The reason I thought it is good to start using Tomcat is free.
I thought i only have to specify the webdoc path like below, it will pick up all the class file under $TOMCAT_HOME/webappl/AAPL
<Context path="/AAPL" docBase="AAPL" <************** Change here, isn't it ****>
debug="5" reloadable="true" crossContext="true">
> Do I need to specify in server.xml file?
no
I only mentioned it because you asked earlier
Your problem just related to your jsp file and the class file.
Have you put the package declaration back in?
no
I only mentioned it because you asked earlier
Your problem just related to your jsp file and the class file.
Have you put the package declaration back in?
ASKER
sorry i dont understand the package declaration. I thought i need to convert to jar file instead of class file. Actually I have read the Tomcat's document, I think they do mention to use jar file instead of class file.
How do i make the package declaration?
How do i make the package declaration?
you had it declared in a package previusly.
you need to add a package statement to the top of the source
it will work as a class file or a jar
you need to add a package statement to the top of the source
it will work as a class file or a jar
ASKER
I have added the package to the Database.java
package AAPL;
in DBTest.jsp - when i run insde the Jdeveloper i failed to find Database.class. Would you tell me how to change the first line like below to import the Database.class. I try import="/AAPL" but not working.
<%@ page contentType="text/html;cha rset=windo ws-1252" language="java" import="java.sql.*" %>
package AAPL;
in DBTest.jsp - when i run insde the Jdeveloper i failed to find Database.class. Would you tell me how to change the first line like below to import the Database.class. I try import="/AAPL" but not working.
<%@ page contentType="text/html;cha
The way you had it previously
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*, AAPL.*" errorPage="" %>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*, AAPL.*" errorPage="" %>
ASKER
The JSP program did get compiled but i got another error. Please advise
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletExcep tion: oracle/jdbc/driver/OracleD river
org.apache.jasper.runtime. PageContex tImpl.doHa ndlePageEx ception(Pa geContextI mpl.java:8 46)
org.apache.jasper.runtime. PageContex tImpl.hand lePageExce ption(Page ContextImp l.java:779 )
org.apache.jsp.DBTest_jsp. _jspServic e(org.apac he.jsp.DBT est_jsp:66 )
org.apache.jasper.runtime. HttpJspBas e.service( HttpJspBas e.java:99)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 25)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:291)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:241)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
root cause
java.lang.NoClassDefFoundE rror: oracle/jdbc/driver/OracleD river
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletExcep
org.apache.jasper.runtime.
org.apache.jasper.runtime.
org.apache.jsp.DBTest_jsp.
org.apache.jasper.runtime.
javax.servlet.http.HttpSer
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
root cause
java.lang.NoClassDefFoundE
It cannot find the oracle jdbc driver classes
It was finding them earlier I think, what did you change?
It was finding them earlier I think, what did you change?
ASKER
I follow your advice.
The earlier problem is the JSP page didnt get compiled. Now I think the page did get compiled and executed but it failed because the Oracle jdbc driver file not found. See below codes
Database.java
=========
package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD river;
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
DriverManager.registerDriv er(new OracleDriver());
System.out.println("before Inside make connection");
con = DriverManager.getConnectio n("jdbc:or acle:thin: @137.172.4 0.107:1521 :gdev", "guidev", "guidev");
System.out.println("Inside make connection");
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
DBTest.jsp
=======
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*, AAPL.*" errorPage="" %>
<P>
<%
Database db = new Database();
db.makeConnection();
Connection con = db.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT to_char(sysdate,'dd/mm/yyy y') today FROM dual");
if (rs !=null) {
while (rs.next()) {
String EmployeeNo = rs.getString("today");
}
}
%>
</P>This is used to test DBTest.jsp
====
What I changed was
import="java.sql.*, AAPL.*" at line 1
The earlier problem is the JSP page didnt get compiled. Now I think the page did get compiled and executed but it failed because the Oracle jdbc driver file not found. See below codes
Database.java
=========
package AAPL;
import java.sql.*;
import oracle.jdbc.driver.OracleD
public class Database
{
Connection con;
public Database()
{
}
public void makeConnection() throws Exception
{
DriverManager.registerDriv
System.out.println("before
con = DriverManager.getConnectio
System.out.println("Inside
}
public void closeConnection() throws SQLException
{
this.con.close();
}
public Connection getConnection()
{
return(this.con);
}
}
DBTest.jsp
=======
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*, AAPL.*" errorPage="" %>
<P>
<%
Database db = new Database();
db.makeConnection();
Connection con = db.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT to_char(sysdate,'dd/mm/yyy
if (rs !=null) {
while (rs.next()) {
String EmployeeNo = rs.getString("today");
}
}
%>
</P>This is used to test DBTest.jsp
====
What I changed was
import="java.sql.*, AAPL.*" at line 1
one of your earlier stack traces indicates that at that point it was finding the driver ok:
at oracle.jdbc.driver.OracleD river.conn ect(Oracle Driver.jav a:551)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 512)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 171)
at Database.makeConnection(Da tabase.jav a:15)
You can download the driver at:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
at oracle.jdbc.driver.OracleD
at java.sql.DriverManager.get
at java.sql.DriverManager.get
at Database.makeConnection(Da
You can download the driver at:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
ASKER
it works. before I close.
Object, would you please tell me how to i see the strack traces in java program and jsp?
In java, i use
ie.printStackTrace()
But i dont know where to see the Stack Trace.
In JSP, where do i find the Stack Trace.
Object, would you please tell me how to i see the strack traces in java program and jsp?
In java, i use
ie.printStackTrace()
But i dont know where to see the Stack Trace.
In JSP, where do i find the Stack Trace.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.