changes in application after upgrading tomcat4 to tomcat6

L

Lew

ruds said:
I have loaded jdbc driver from weblogic in my tomcat.

This is a JDBC driver for Access?
But still my application wont work i have changed the files according
to Tomcat's documentation as suggested to me by Lew.

What files did you change?
 
M

Martin Gregorie

Sabine said:
I would first see if Microsoft provides a JDBC driver for Access. If
not, maybe the generic JDBC-ODBC driver works.
>
Ivor Horton's "Beginning Java" book (written, IIRC, for JDK 1.3) has
Access examples, all using the JDBC-ODBC bridge and the Access ODBC driver.
 
R

ruds

LEW ,
I have changed the java file which is used by my application and
contains the code for database connection.
As well as the context.xml,web.xml,etc.. specified in the tomcat 6
docs.
I going wrong smwhere but where i dont know...
 
L

Lew

ruds said:
I have changed the java [sic] file which is used by my application and
contains the code for database connection.
As well as the context.xml,web.xml,etc.. specified in the tomcat [sic] 6
docs.
I going wrong smwhere but where i [sic] dont know...

Could you share the details of these changes with us?
 
R

ruds

ruds said:
I have changed the java [sic] file which is used by my application and
contains the code for database connection.
As well as the context.xml,web.xml,etc.. specified in the tomcat [sic] 6
docs.
I going wrong smwhere but where i [sic] dont know...

Could you share the details of these changes with us?

Ok.Here are the details:
In the installdir/conf/server.xml file following additions have been
made:-
Under GlobalNamingResources I have added the line,
<Resource name="jdbc/MyDSN" auth="Container"
type="javax.sql.DataSource" description="Sample Database"/>

In the installdir/webapps/myapp/META-INF/context.xml I have added,
<Resource name="jdbc/MyDSN" auth="Container"
type="javax.sql.DataSource" username="" password=""
driverClassName="sun.java.jdbc.JdbcOdbcDriver" url="JdbcOdbcDriver"
maxActive="20" maxIdle="4"/>

In the Java file i have wriiten the following code,
import java.sql.*;
public static Connection connect() throws java.sql.SQLException
{
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
DataSource ds = (DataSource)
envCtx.lookup("jdbc/MyDSN");
}
 
R

ruds

I followed the tutorial on coreservlets.com for configuring tomcat6
but now even the tomcat homepage does not open... :(
wht should I do?
 
A

Arne Vajhøj

Nigel said:
What about JSP? Does it need a compiler for those, or does it have one built in?

Old Tomcat's require javac.

I believe newer Tomcat's uses the Eclipse compiler.

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,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top