FW: Re: jdbc works with java programs. not with tomcat.

From: "Raghunath T" <raghunatht(at)mindtree(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: FW: Re: jdbc works with java programs. not with tomcat.
Date: 2001-04-13 11:39:34
Message-ID: 7D6D227F5351FA4FB0A6B6FDBC0578F20384CB@hqbng01ex01.mindtree.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

-----Original Message-----
From: Raghunath T
Sent: Fri 4/13/2001 4:00 PM
To: Brett W. McCoy; pgsql-jdbc(at)posthgresql(dot)org
Cc:
Subject: RE: [JDBC] Re: jdbc works with java programs. not with
tomcat.

In every tomcat installation, there is a folder webapps. This folder contains
all the virtual folders for various applications hosted.
For e.g let your application be named as myApp.
First you'll have to edit hte server.xml file to add a context for
your application.
Then all the class files are to be placed in a specific folder
structure.
Let TOMCAT_HOME be /usr/local/tomcat
then the folder for your application will be
/usr/local/tomcat/webapps/myApp.
This will have all the html/ jsp pages.
Then you should go into the folder
/usr/local/tomcat/webapps/myApp/WEB-INF. If WEB-INF is not there then
you should create it.
This should contain three folder's classes, etc and lib.(If they
don't exist, create them). The WEB-INF folder should have web.xml file which
you have to use to register all the servlets.
/usr/local/tomcat/webapps/myApp/WEB-INF/classes should contain all
the .class files used by the jsp's and the servlet classes.

/usr/local/tomcat/webapps/myApp/WEB-INF/etc should contain any text
files etc used by the application.

/usr/local/tomcat/webapps/myApp/WEB-INF/lib should contain any third
party jar files you use. This is the appropriate place for postgresql.jar.

This is the standard deployment structure that anyone should follow
with tomcat. For more information please read the documentation at
http://jakarta.apache.org/tomcat

Always use startup.sh and shutdown.sh in /usr/local/tomcat/bin to
either startup or shutdown tomcat.
If you are facing any problems with shutdown, as a worst case, you
may have to do a ps -ef , find the pid of tomcat process and kill it.

Regards,
Raghunath T

-----Original Message-----
From: Brett W. McCoy
Sent: Fri 4/13/2001 2:19 AM
To: Andrew B. Luck
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: [JDBC] Re: jdbc works with java programs. not with tomcat.

On Thu, 12 Apr 2001, Andrew B. Luck wrote:

> Tomcat doesn't shut down. I use the command 'tomcat stop' & it hangs with
> the message 'Stoping tomcat on 8007 null' (one 'p' in stopping). Fixing
> this would be fantastic - right now I have to reboot every time I try to
> place postgresql.jar in a different directory.

You shouldn't ever have to reboot Linux unless you have a very serious
hardware error that has locked up your system.

I recommend using the shell scripts provided with Tomcat to start and shut
it down. Also, there is no need to place & at the end of 'tomcat stop'.

As for the CLASSPATH tomcat searches, if you use startup.sh and
shutdown.sh provided with Tomcat, it lists the classpath Tomcat is using
before Tomcat starts up. You can add custom classpaths to the script or
add to the system classpath.

> I've been starting PostgreSQL with the command '/etc/rc.d/init.d/postgresql
> start'. How can I cause it to start automatically?

Most likely, there should be a link (probably something like S##postgres)
under /etc/rc.d/rc3 that points back to the main startup script, which
should start up PostgreSQL upon bootup. What version of Linux are you
using?

-- Brett
http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
"Your attitude determines your attitude."
-- Zig Ziglar, self-improvement doofus

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

Browse pgsql-jdbc by date

  From Date Subject
Next Message Andrew B. Luck 2001-04-13 17:49:27 Re: jdbc works with java programs. not with tomcat.
Previous Message Brett W. McCoy 2001-04-12 20:49:57 Re: jdbc works with java programs. not with tomcat.