Using Derby and TOMCAT

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using Derby and TOMCAT

Daniel Godefroy
I want to use Derby and Tomcat in a web site. The web server is on a
linux 2.6.32 with an Apache server 2.2.32.

I dont think Java, Tomcat and Derby are installed. I access the servere
thruough Cpanel and WHM. I was told that cpanel and WHM do not manage
Java and Derby so they can not help me on the matter.

I tried Tomcat and derby with Eclipse on my computer and it works. In my
set up i use a Derby network server according to the instructions i got.
This requires that I have to start the Derby server independently using
localhost. In my regular setup i am using Derby with 0.0.0.0 in order to
accept queries from any computer on my local network.

My questions are:

1- Should I use the Embedded Derby server with Tomcat so that Tomcat
start the server itself? I am not sure Tomcat can work with Derby
started at 0.0.0.0. In the future context of a web site, is this a
requirement or can I still use the Derby network server with Tomcat?

2- In teh Web site, should the Derby database be installed within Tomcat
directories or can it be anywhere like on my computer?

  Thank you



--
Daniel Godefroy
Consultant en informatique de gestion
5732 trans Island             2 Impasse Couloute
Montréal, Québec, H3W 3B2     Pétionville, Haiti
+1:514-577-0738/305-433-2762  +509-3448-5673
+1-514-448-1077

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using Derby and TOMCAT

George Sexton



On 5/24/2017 6:34 AM, Daniel Godefroy wrote:
I want to use Derby and Tomcat in a web site. The web server is on a linux 2.6.32 with an Apache server 2.2.32.

Not really important. Tomcat and Java versions are vastly more critical.


I dont think Java, Tomcat and Derby are installed. I access the servere thruough Cpanel and WHM. I was told that cpanel and WHM do not manage Java and Derby so they can not help me on the matter.

Tomcat can be very difficult to setup on CPanel. Once you get Tomcat running, you don't need to install tomcat.


I tried Tomcat and derby with Eclipse on my computer and it works. In my set up i use a Derby network server according to the instructions i got. This requires that I have to start the Derby server independently using localhost. In my regular setup i am using Derby with 0.0.0.0 in order to accept queries from any computer on my local network.

My questions are:

1- Should I use the Embedded Derby server with Tomcat so that Tomcat start the server itself? I am not sure Tomcat can work with Derby started at 0.0.0.0. In the future context of a web site, is this a requirement or can I still use the Derby network server with Tomcat?

Using Derby as embedded will make your life vastly simpler because you can just put the Derby jars in your WEB-INF/lib directory. On my system, I put the DB in WEB-INF/sql/DERBY.

You can change later to network derby if you want by just moving the DB, and changing the JDBC Connection information.


2- In teh Web site, should the Derby database be installed within Tomcat directories or can it be anywhere like on my computer?

Again, I recommend you put the derby jar files in your WAR's WEB-INF/lib. This is the easiest thing.

One thing to remember: If you put the DB files in the web application directory, removing the webapp will cause tomcat to delete your DB. Don't put the DB files in the web app directory, or make sure that you're really careful.


 Thank you




--
George S.
MH Software, Inc.
Voice: 303 438 9585
http://www.connectdaily.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using Derby and TOMCAT

George Sexton



On 5/24/2017 8:53 AM, George S. wrote:



On 5/24/2017 6:34 AM, Daniel Godefroy wrote:
I want to use Derby and Tomcat in a web site. The web server is on a linux 2.6.32 with an Apache server 2.2.32.

Not really important. Tomcat and Java versions are vastly more critical.


I dont think Java, Tomcat and Derby are installed. I access the servere thruough Cpanel and WHM. I was told that cpanel and WHM do not manage Java and Derby so they can not help me on the matter.

Tomcat can be very difficult to setup on CPanel. Once you get Tomcat running, you don't need to install tomcat.

That was brain-damaged. You don't need to install derby.



I tried Tomcat and derby with Eclipse on my computer and it works. In my set up i use a Derby network server according to the instructions i got. This requires that I have to start the Derby server independently using localhost. In my regular setup i am using Derby with 0.0.0.0 in order to accept queries from any computer on my local network.

My questions are:

1- Should I use the Embedded Derby server with Tomcat so that Tomcat start the server itself? I am not sure Tomcat can work with Derby started at 0.0.0.0. In the future context of a web site, is this a requirement or can I still use the Derby network server with Tomcat?

Using Derby as embedded will make your life vastly simpler because you can just put the Derby jars in your WEB-INF/lib directory. On my system, I put the DB in WEB-INF/sql/DERBY.

You can change later to network derby if you want by just moving the DB, and changing the JDBC Connection information.


2- In teh Web site, should the Derby database be installed within Tomcat directories or can it be anywhere like on my computer?

Again, I recommend you put the derby jar files in your WAR's WEB-INF/lib. This is the easiest thing.

One thing to remember: If you put the DB files in the web application directory, removing the webapp will cause tomcat to delete your DB. Don't put the DB files in the web app directory, or make sure that you're really careful.


 Thank you




--
George S.
MH Software, Inc.
Voice: 303 438 9585
http://www.connectdaily.com

--
George S.
MH Software, Inc.
Voice: 303 438 9585
http://www.connectdaily.com
Loading...