Connect to db2/400 through jsp

S

savita

Hello,
I am new to jsp. Could someone please help me out.
I have successfully connected to db2/400 through java in WDSC.
I am connecting db2/400 through jsp in WDSC.
I am using com.ibm.as400.access.AS400JDBCDriver.
The following exception is thrown:-
java.lang.ClassNotFoundException:
com.ibm.as400.access.AS400JDBCDriver
I have included the jt400.jar in java classpath.
It's in Java Source folder.
The jsp file is in WebContent->WEB-INF->jsp file

Thanks
Regards
Savita
 
A

Andrew Thompson

savita said:
Hello,
I am new to jsp. Could someone please help me out.
I have successfully connected to db2/400 through java in WDSC.
I am connecting db2/400 through jsp in WDSC.
I am using com.ibm.as400.access.AS400JDBCDriver.
The following exception is thrown:-
java.lang.ClassNotFoundException:
com.ibm.as400.access.AS400JDBCDriver
I have included the jt400.jar in java classpath.

Do you mean here..
WEB-INF/lib/jt400.jar
?

Andrew T.
 
S

savita

Hello,
The jt400.jar is installed in :-
Dynamic Web Projects/Projectname(test)/Java
Resources/JavaSource/jt400.jar
If jt400.jar has to be pkaced in WEB-INF ,ho winstall .jar file here?
Thanks
Regards
Savita
 
A

Andrew Thompson

savita said:

Please refrain from top-posting.
The jt400.jar is installed in :-
Dynamic Web Projects/Projectname(test)/Java
Resources/JavaSource/jt400.jar
If jt400.jar has to be pkaced in WEB-INF ,ho winstall .jar file here?

I do not know - with tomcat, I'd simply put the file
there myself.

Andrew T.
 
L

Lew

It is a basic fact of (JEE) Web applications that JARs used by the app go into
the application's WEB-INF/lib/ directory, just like it is a basic fact that
individual packages/classes go into the WEB-INF/classes directory and the
deployment descriptor is WEB-INF/web.xml.

<http://tomcat.apache.org/tomcat-5.5-doc/appdev/deployment.html>
and you can google around for more from Sun, IBM and so on.

How you get the JARs into the right directory can be by "copy" (Win), "cp"
(Linux), Ant (all platforms), graphical interfaces to the file system, your
favorite IDE and so forth. Eclipse and Netbeans, for example, will build the
JARs where they belong if you call them "libraries" in the project properties.

- Lew
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Lew said:
How you get the JARs into the right directory can be by "copy" (Win),
"cp" (Linux), Ant (all platforms), graphical interfaces to the file
system, your favorite IDE and so forth. Eclipse and Netbeans, for
example, will build the JARs where they belong if you call them
"libraries" in the project properties.

Some servers prefer that you use their special deployment tool.

Arne
 
L

Lew

Some servers prefer that you use their special deployment tool.

Not only that, as a workaday programmer one must conform to the deployment
procedures of one's employer, which can sometimes seem quite rococo.

- Lew
 
S

savita

Hello,
" I am connecting to db2/400 through jsp in WDSC"

I have put jt400.jar in the folllowing directory:-

C:\Documents and
Settings\Administrator\IBM\rationalsdp6.0\workspace\test1\WebContent\WEB-INF\lib

Then to I am getting the error :
java.lang.ClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver

In the follwing directory (JavaSource) I have set classpath
=C:\Program Files\IBM\Client Access\jt400\lib\jt400.jar
C:\Documents and
Settings\Administrator\IBM\rationalsdp6.0\workspace\test1\JavaSource
The java jdbc code connects to db2/400 fine.

The jsp file is not getting the jt400.jar file.
The server used here is AS400 server.

Thanks
Regards
Savita
 
A

Andrew Thompson

savita said:

Please refrain from top-posting.
C:\Documents and
Settings\Administrator\IBM\rationalsdp6.0\workspace\test1\WebContent\WEB-INF\lib

Is that WEB-INF directory *the* WEB-INF directory
as seen by your (shrugs vaguely ..what was it?)
AS400* server?
Then to I am getting the error :
java.lang.ClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver ...
The server used here is AS400 server.

Is it a test or production server?
One good way to 'refresh' a server is to restart it,
but that might not be a good option for a production
server.

( * Ultimately, you may actually need to RTFM of
your AS400 server )

Andrew T.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

savita said:
" I am connecting to db2/400 through jsp in WDSC"

I have put jt400.jar in the folllowing directory:-

C:\Documents and
Settings\Administrator\IBM\rationalsdp6.0\workspace\test1\WebContent\WEB-INF\lib

Then to I am getting the error :
java.lang.ClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver

If you are using WebSphere Application Server then try
put the jar in WEB-INF\lib in the war and redeploy the war.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top