Hi
Thanks, it works

and i did not had to put anything in web.xml it just
picked every thing it want from context.xml
Ashish
--- Coy Krill <coyk@xxxxxxxxxx> wrote:

Forgot to paste the web.xml file!

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee";

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
<display-name>WIB Dashboard</display-name>
<context-param>
<param-name>db_dataSource</param-name>
<param-value>jdbc/db400</param-value>
</context-param>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<resource-ref>
<res-ref-name>jdbc/db400</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>

<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>


Coy Krill
Systems Analyst
Whidbey Island Bank


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Coy Krill
Sent: Thursday, September 27, 2007 10:27
To: Java Programming on and around the iSeries /
AS400
Subject: RE: JNDI on tomcat and Web Logic
application server for AS400
usingJT400

Ashish,

The files I'm putting in here are from a
proof-of-concept that
management never went with so it may not be the best
way to do it, but
it worked here.

The following xml is the context.xml file for the
web app. You'll notice
that there are two different resources. The one
currently uncommented is
for off the as400 and the other is for when it's
deployed on the as400.
In either case, the username and password should be
real ones, I just
replaced them with asterisks for posting. You'll
need to change the url
to match your environment as well.

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/dashboard">
<Resource name="jdbc/db400"
auth="Container"


factory="org.apache.commons.dbcp.BasicDataSourceFactory"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="20"
maxWait="300"
removeAbandoned="true"
removeAbandonedTimeout="120"
logAbandoned="false"
username="******"
password="******"


driverClassName="com.ibm.as400.access.AS400JDBCDriver"
url="jdbc:as400://as400.wibank.com/"
/>
<!-- <Resource name="jdbc/db400"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="20"
maxWait="300"
removeAbandoned="true"
removeAbandonedTimeout="120"
logAbandoned="false"
username="******"
password="******"

driverClassName="com.ibm.db2.jdbc.app.DB2Driver"
url="jdbc:db2:s109dfda"
/> -->
</Context>

This next one is the web.xml and it reference the
dat

I remember using the tomcat reference to get this
accomplished. We never
took it anywhere and we've done nothing web wise on
the as400 since.
We're an MS shop for everything but our core banking
software so it's
hard to get management buyoff on anything but MS
Sharepoint and SQL
Sever 200x.

Hopefully this will get you started.


Coy Krill
Systems Analyst
Whidbey Island Bank


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Ashish Kulkarni
Sent: Thursday, September 27, 2007 07:23
To: java400-l@xxxxxxxxxxxx
Subject: JNDI on tomcat and Web Logic application
server for AS400 using
JT400

Hi
Has anyone setup JNDI for AS400 DB2 on tomcat and
Web
Logic application using JT400.jar?

Can you give some points how you did setit up and
used
it in your web application

Ashish

A$HI$H





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.