Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2007

Tip: Looking for answers? Try searching our database.

Connect to db2/400 through jsp

Thread view: 
savita - 03 Jan 2007 12:12 GMT
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
Andrew Thompson - 03 Jan 2007 13:11 GMT
> Hello,
>       I am new to jsp. Could someone please help me out.
[quoted text clipped - 5 lines]
> 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.
savita - 03 Jan 2007 13:56 GMT
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

> > Hello,
> >       I am new to jsp. Could someone please help me out.
[quoted text clipped - 11 lines]
>
> Andrew T.
Andrew Thompson - 03 Jan 2007 14:39 GMT
> Hello,

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.
Lew - 03 Jan 2007 23:29 GMT
>>  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?

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
Arne Vajhøj - 04 Jan 2007 00:26 GMT
> 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
Lew - 04 Jan 2007 05:22 GMT
Lew wrote:
>> 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.

> 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
savita - 04 Jan 2007 11:03 GMT
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

> Lew wrote:
> >> How you get the JARs into the right directory can be by "copy" (Win),
[quoted text clipped - 7 lines]
>
> - Lew
Andrew Thompson - 04 Jan 2007 11:13 GMT
> Hello,

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.
Arne Vajhøj - 05 Jan 2007 02:01 GMT
>              " I am connecting to db2/400 through jsp in WDSC"
>
[quoted text clipped - 5 lines]
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.