My problem starts when I rewrite TestEmpDS.java from a client program to a servlet class for Tomcat so that I can invoke it from a browser. CLASSPATH= /usr/local/jakarta-tomcat-4.0.4/webapps/ROOT/WEB-INF/classes/com/developer/DataSource The TOMCAT directory tree is as follows : $SERVLET_HOME/com/developer/DataSource... .../connections/TestEmpDS.java... // this is the client java program which calls on the other classes .../connections/AllEmpDS.java.....// gets a free db connection from pool and gets the result set from SQL statement .../pooling/OraDSPool.java .......// creates a pool of db connections and keep track of them .../datasource/OraDSClient.java...// create on single physical db connection using the jndi .binding parameters .../datasource/OraDSServer.java...// created the JNDI .bindings file in the jndi subdirectory .../profiler/profiler.java..... ..// profiles the connection time The JNDI properties files are as follow: $SERVLET_HOME/com.developer/DataSource... .../OraSource.properties .../oraDemo.properties Problems : Works find from the command line level using "java connections.TestEmpDS". When I rewrite the client application program into a servlet "webTestEmpDS.java" for the webbrowser and use Tomcat on it, it gets confused with finding the other classes. (Issue) Instead of "package connections" , it now requires "package com.developer.DataSource.connections" in order to find the class file. (Problem) WebTestEmpDS cannot compile now because of following error : webTestEmpDS.java:17:cannot resolve symbol symbol class : webAllEmpDS location: class com.developer.DataSource.connections.webTestEmpDS webAllEmpDS showAll = new webAllEmpDS(); ^ ... The original code for the client java application "TestEmpDS.java" which works at cmd-line :
The revised code to create a java servlet in TOMCAT for the browser
Put webAllEmpDS.class in usr/local/jakarta-tomcat-4.0.4/webapps/ROOT/WEB-INF/classes/com/developer/DataSource/connections folder. Make sure you have package com.developer.DataSource.connections; declared for webAllEmpDS.java
Joined: Jul 29, 2002
Hi ! Thanks all, problem resolved.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com