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 / December 2007

Tip: Looking for answers? Try searching our database.

changes in application after upgrading tomcat4 to tomcat6

Thread view: 
ruds - 09 Dec 2007 09:44 GMT
Hi
Can someone tell me what changes i have to make to my existing
application currently running on tomcat 4 after i upgrade it to tomcat
6?
Thanks in advance for your help.
Arne Vajhøj - 09 Dec 2007 16:26 GMT
> Can someone tell me what changes i have to make to my existing
> application currently running on tomcat 4 after i upgrade it to tomcat
> 6?

First guess: none.

So try it and see what error you get (if any) and take it from
there.

Arne
Lew - 09 Dec 2007 16:42 GMT
>> Can someone tell me what changes i have to make to my existing
>> application currently running on tomcat 4 after i upgrade it to tomcat
[quoted text clipped - 4 lines]
> So try it and see what error you get (if any) and take it from
> there.

Well, you will have to redeploy the application into the webapps/ of the new
Tomcat.

Signature

Lew

ruds - 10 Dec 2007 03:29 GMT
Thanks anne and lew.
Arne Vajhøj - 10 Dec 2007 03:35 GMT
> Thanks anne and lew.

s/an/ar/w

Arne
Lasse Reichstein Nielsen - 10 Dec 2007 06:14 GMT
>> Thanks anne and lew.
>
> s/an/ar/w
>
> Arne

"Tharks arne ard lew"?

/L >:)
Signature

Lasse Reichstein Nielsen  -  lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
 'Faith without judgement merely degrades the spirit divine.'

Arne Vajhøj - 10 Dec 2007 23:48 GMT
>>> Thanks anne and lew.
>> s/an/ar/w
[quoted text clipped - 4 lines]
>
> /L >:)

:-)  :-)  :-)

Arne
ruds - 11 Dec 2007 05:05 GMT
I have installed tomcat6 and java 6 on my server, which is Windows
server 2003.
tomcat selected jre6 instead of jdk while installing, will it give me
problem?
after i deployed my existing application which was running on tomcat4
to the new onw i get an error as 'Data Source name not found'.
I have changed a Environment Variables to the new ones.
what might be the problem?
Lew - 11 Dec 2007 05:12 GMT
> I have installed tomcat6 and java 6 on my server, which is Windows
> server 2003.
> tomcat selected jre6 instead of jdk while installing, will it give me
> problem?

Tomcat doesn't need the JDK.  The JDK is for building the applications, the
JRE is for running them.

The JDK includes a JRE, but that's not important here.

> after i [sic] deployed my existing application which was running on tomcat4
> to the new onw i get an error as 'Data Source name not found'.
> I have changed a Environment Variables to the new ones.
> what might be the problem?

Data Sources have to be defined in a deployment descriptor; they don't come
from environment variables.

<http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html>

I admit that I find the instructions a bit tricky myself.

Signature

Lew

ruds - 11 Dec 2007 09:12 GMT
> > 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

Nigel Wade - 11 Dec 2007 15:00 GMT
>> 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
Thomas Kellerer - 11 Dec 2007 15:09 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.
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


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



©2009 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.