> > I have installed tomcat6 and java 6 on my server, which is Windows
> > server 2003.
[quoted text clipped - 20 lines]
> --
> Lew
If i download postgresSQL JDBC driver will it work on windows?
Previuosly i did'nt require this to be done.Why so?
Lew - 11 Dec 2007 14:10 GMT
> If i
The word is "I".
> download postgresSQL
PostgreSQL.
> JDBC driver will it work on windows?
It should.
> Previuosly i did'nt require this to be done.Why so?
Not enough information to know. What was different?

Signature
Lew
>> I have installed tomcat6 and java 6 on my server, which is Windows
>> server 2003.
[quoted text clipped - 3 lines]
> Tomcat doesn't need the JDK. The JDK is for building the applications, the
> JRE is for running them.
What about JSP? Does it need a compiler for those, or does it have one built in?
[I've never used JSP.]

Signature
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Lew - 11 Dec 2007 15:16 GMT
>>> I have installed tomcat6 and java 6 on my server, which is Windows
>>> server 2003.
[quoted text clipped - 5 lines]
> What about JSP? Does it need a compiler for those, or does it have one built in?
> [I've never used JSP.]
You might be right. (Checking . . . )
It looks like you are absolutely correct.

Signature
Lew
Lew - 11 Dec 2007 15:18 GMT
>>> I have installed tomcat6 and java 6 on my server, which is Windows
>>> server 2003.
[quoted text clipped - 5 lines]
> What about JSP? Does it need a compiler for those, or does it have one built in?
> [I've never used JSP.]
You can use precompiled JSPs and install Tomcat just with a JRE.
> For Tomcat to function fully you need a full Java Development Kit (JDK),
> If you intend to simply run pre compiled JavaServer pages
> you can do so using just the Java Runtime Environment(JRE).
<http://www.recital.com/articles/cm/tomcat/article.htm>

Signature
Lew
Arne Vajhøj - 16 Dec 2007 03:03 GMT
>>> I have installed tomcat6 and java 6 on my server, which is Windows
>>> server 2003.
[quoted text clipped - 4 lines]
>
> 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
Lew, 11.12.2007 06:12:
> Tomcat doesn't need the JDK. The JDK is for building the applications,
> the JRE is for running them.
Not sure about Tomcat6, but Tomcat4 definitely needed the JDK because it
used javac to compile the servlets generated from the JSP pages.
Lew - 11 Dec 2007 15:18 GMT
> Lew, 11.12.2007 06:12:
>> Tomcat doesn't need the JDK. The JDK is for building the
>> applications, the JRE is for running them.
>
> Not sure about Tomcat6, but Tomcat4 definitely needed the JDK because it
> used javac to compile the servlets generated from the JSP pages.
See the response to Nigel Wade's post.

Signature
Lew
ruds - 12 Dec 2007 06:38 GMT
From where do I get the JDBC driver for MS Access Sun java's site has
so many links...
Which would be the right one? and free to download.
Sabine Dinis Blochberger - 12 Dec 2007 10:25 GMT
> From where do I get the JDBC driver for MS Access Sun java's site has
> so many links...
> Which would be the right one? and free to download.
I would first see if Microsoft provides a JDBC driver for Access. If
not, maybe the generic JDBC-ODBC driver works.

Signature
Sabine Dinis Blochberger
Op3racional
www.op3racional.eu
ruds - 12 Dec 2007 11:09 GMT
I have loaded jdbc driver from weblogic in my tomcat.
But still my application wont work i have changed the files according
to Tomcat's documentation as suggested to me by Lew.
Does someone have a step by step and simple way of to doing database
connection.Please et me know as the documentation is very confusing..
Thomas Kellerer - 12 Dec 2007 11:17 GMT
ruds, 12.12.2007 12:09:
> Does someone have a step by step and simple way of to doing database
> connection.
http://java.sun.com/docs/books/tutorial/jdbc/index.html
http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html
Lew - 12 Dec 2007 14:46 GMT
> 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?

Signature
Lew
Martin Gregorie - 12 Dec 2007 21:12 GMT
>> From where do I get the JDBC driver for MS Access Sun java's site has
>> so many links...
>> Which would be the right one? and free to download.
>
> 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.

Signature
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
ruds - 14 Dec 2007 02:53 GMT
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...
Lew - 14 Dec 2007 03:13 GMT
> 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?

Signature
Lew
ruds - 14 Dec 2007 03:47 GMT
> > I have changed the java [sic] file which is used by my application and
> > contains the code for database connection.
[quoted text clipped - 6 lines]
> --
> Lew
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");
}
ruds - 14 Dec 2007 06:16 GMT
I followed the tutorial on coreservlets.com for configuring tomcat6
but now even the tomcat homepage does not open... :(
wht should I do?
Thomas Kellerer - 12 Dec 2007 11:04 GMT
ruds, 12.12.2007 07:38:
> From where do I get the JDBC driver for MS Access Sun java's site has
> so many links...
> Which would be the right one? and free to download.
There is no JDBC driver for Access (at least no free one as far as I
know). There is only an ODBC driver (which is shipped together with
Windows).
You need to use the JDBC/ODBC bridge to connect to an Access database.
That bridge is part of the JDK, so you don't need to download anything.
You don't need to create a DataSource to be able to connect to Access,
as you can specify the database file directly:
jdbc:odbc:DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=c:\Daten\db\access\test.mdb
(Note the URL is one line only)
Thomas