Auto Reload Features by Tomcat

2006-06-02 Thread ks.foong
Hi, I notice that starting from Tomcat 5 onwards; we can enjoy the benefit
of the Auto-reload features of it.

 

I personally have tried it with my Eclipse development. Each time I have
changed any servlet coding, the eclipse (or more specific, Tomcat) able to
detect the changes and Reload for itself.

 

But for my production, I am not sure how this is work. I have replaced my
servlet, ProfileServlet.java to the
[CATALINA_HOME]/webapps/project/WEB-INF/src/com/servlet folder. 

 

I login into my system; I didn't see any changes at all. 

 

So, any ideas how can is this reload features work in production machine? Do
I need to issues any command for this?

 



RE: Auto Reload Features by Tomcat

2006-06-02 Thread ks.foong
Forget to mentioned, I have make sure my Context tag in server.xml have
included the reloadable=true entity

Context path=/project reloadable=true ...

Foong Kim Seong
 
-Original Message-
From: ks.foong [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 02, 2006 4:52 PM
To: 'Tomcat Users List'
Subject: Auto Reload Features by Tomcat

Hi, I notice that starting from Tomcat 5 onwards; we can enjoy the benefit
of the Auto-reload features of it.

 

I personally have tried it with my Eclipse development. Each time I have
changed any servlet coding, the eclipse (or more specific, Tomcat) able to
detect the changes and Reload for itself.

 

But for my production, I am not sure how this is work. I have replaced my
servlet, ProfileServlet.java to the
[CATALINA_HOME]/webapps/project/WEB-INF/src/com/servlet folder. 

 

I login into my system; I didn't see any changes at all. 

 

So, any ideas how can is this reload features work in production machine? Do
I need to issues any command for this?

 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Changing the Tomcat 5.0 Directory installed in FreeBSD

2006-05-31 Thread ks.foong
Hi

 

I have installed the Jakarta-tomcat5.0 into my FreeBSD machine. 

 

As my project required, I have to move the entire installed directory from 

 

/usr/local/Jakarta-tomcat5.0   to   /Project/Tomcat folder 

 

I manage to perform the above operation. But when I go to:

 

/Project/Tomcat/bin 

 

to issues the ./startup.sh command, I have this error :

 

Cannot find /Project/Tomcat/bin/setclasspath.sh

This file is needed to run this program

 

But I see the file, setclasspath.sh located there, in /Project/Tomcat/bin
folder.

 

So, my question is: when I changing the directory of tomcat, any other
setting that I have to do typically for tomcat?

 

Thank you

 

Foong

 

 



RE: Changing the Tomcat 5.0 Directory installed in FreeBSD

2006-05-31 Thread ks.foong
I have checked the /Project/Tomcat/bin/catalina.sh, it's using the
$CATALINA_HOME as an environment variable and I have change/set in the
.cshrc file, a file where it'll start loaded when I sign in to the FreeBSD
system.

I also perform an echo command, $CATALINA_HOME for me and its return
/Project/Tomcat as expected. :)

Any other environment setting I should set?

 
Foong Kim Seong
 
-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 3:48 PM
To: Tomcat Users List
Subject: Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

ks.foong wrote:
 I have installed the Jakarta-tomcat5.0 into my FreeBSD machine.

 As my project required, I have to move the entire installed directory from
 /usr/local/Jakarta-tomcat5.0   to   /Project/Tomcat folder

 I manage to perform the above operation. But when I go to:
 /Project/Tomcat/bin
 to issues the ./startup.sh command, I have this error :
 Cannot find /Project/Tomcat/bin/setclasspath.sh
 This file is needed to run this program
 But I see the file, setclasspath.sh located there, in /Project/Tomcat/bin
 folder.

 So, my question is: when I changing the directory of tomcat, any other
 setting that I have to do typically for tomcat?

catalina.sh (which is started vom startup.sh) tries to source
$CATALINA_HOME/bin/setclasspath.sh
Maybe you have set the environment variable CATALINA_HOME to point to the
old 
location (/usr/local/Jakarta-tomcat5.0).
Unset CATALINA_HOME.

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Changing the Tomcat 5.0 Directory installed in FreeBSD

2006-05-31 Thread ks.foong
setclasspath.sh is in the directory of /Project/Tomcat/bin folder, same as
startup.sh

readable? I am not sure how to confirm is it readable or not but it's there
in the same directory.

 
Foong Kim Seong
 
-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 4:11 PM
To: Tomcat Users List
Subject: Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

ks.foong wrote:
 I have checked the /Project/Tomcat/bin/catalina.sh, it's using the
 $CATALINA_HOME as an environment variable and I have change/set in the
 .cshrc file, a file where it'll start loaded when I sign in to the FreeBSD
 system.

 I also perform an echo command, $CATALINA_HOME for me and its return
 /Project/Tomcat as expected. :)

 Any other environment setting I should set?

Is setclasspath.sh readable?

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JNDI data source failing

2006-05-31 Thread ks.foong
Hi, I have just solved this problem on my machine. I notice it does not
locate the .jar file required by the Data source connection pooling. 

Try putting all the files, mentioned in here:
http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html

Jakarta-Commons DBCP 1.0 
Jakarta-Commons Collections 2.0 
Jakarta-Commons Pool 1.0

But I have to remind you, put those packages in the
[CATALINA_HOME]/shared/lib folder instead of [CATALINA_HOME]/common/lib.

Update me if it's help. I just noticed this issue.
 
Foong Kim Seong
 

-Original Message-
From: Dan Simmonds [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 4:10 PM
To: Tomcat Users List
Subject: Re: JNDI datasource failing

I have tried to put the resource in the server.xml file, and found that 
the same problem occurred.

Also the exact same configuration works flawlessly in my test 
environment, so I don't know. I'd rather keep the details in my webapp's 
context if possible.

Dan


Martin Grogan wrote:
 Hi Dan,
 I had the exact problem with my hosting company. The problem was the 
 resource was not being read from our context.xml file on Tomcat 
 startup. The guys at the hosting company had to put the entry for the 
 resource inside our context in the Tomcat common config.
 Maybe you are experiencing something like this?
 Martin


 Dan Simmonds wrote:

 I hope someone can help me with this problem. I have a webapp that 
 used an JNDI datasource that runs fine on my local test environment. 
 When I put it on my server it fails with the following error:

 javax.servlet.jsp.JspException: Unable to get connection, DataSource 
 invalid: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
 create JDBC driver of class '' for connect URL 'null'

 JDBC drivers for postgreSQL are in tomcat_home/common/lib.
 I wrote a java app that uses straight JDBC with the same connection 
 URL and other parameters and it worked just fine.

 My local test environment is tomcat 5.5 running through eclipse with 
 the web tools plugins.
 In production I'm using tomcat 5.5 also, exporting my project as a 
 WAR file.

 I'm at a loss as to what could be wrong. Can anyone help me?

 Dan

 Here are my configuration files:

 server.xml
 --

 Server port=8005 shutdown=SHUTDOWN

  Listener 
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener 
 /
  Listener 

className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ 


  !-- Define the Tomcat Stand-Alone Service --
  Service name=Catalina
!-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009
   enableLookups=false redirectPort=8443 
 protocol=AJP/1.3 /

!-- An Engine represents the entry point (within Catalina) that 
 processes
 every request.  The Engine implementation for Tomcat stand alone
 analyzes the HTTP headers included with the request, and 
 passes them
 on to the appropriate Host (virtual host). --
 !-- Define the top level container in our container 
 hierarchy --
Engine name=Catalina defaultHost=localhost


  !-- Define the default virtual host --
  Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=localhost_access_log. 
 suffix=.txt
 pattern=common resolveHosts=false/
  /Host

  Host name=.x.com appBase=/var/www/
unpackWARs=false autoDeploy=true

Context path=/ docBase=Web.war debug=0 
 reloadable=true/

Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=trinket_access_log. 
 suffix=.txt
 pattern=common resolveHosts=false/
/Host
/Engine
  /Service
 /Server

 META-INF/context.xml
 

 Context
 !-- defines the trinket database as a resource --
 Resource name=jdbc/DB
auth=Container
factory=org.apache.commons.dbcp.BasicDataSourceFactory
type=javax.sql.DataSource
driverClassName=org.postgresql.Driver
url=jdbc:postgresql://localhost:5432/database
username=user
password=pass
maxActive = 10
maxWait = 1
removeAbandoned = true
removeAbandonedTimeout = 60
maxIdle = 5
validationQuery = select 1
testWhileIdle = true
initialSize = 5
minIdle = 3
timeBetweenEvictionRunsMillis = 3
numTestsPerEvictionRun = 3
minEvictableIdleTimeMillis = 24000 /
 /Context



 WEB-INF/web.xml
 ---


 ?xml version=1.0 encoding=UTF-8?
 web-app id=WebApp_ID version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

RE: Changing the Tomcat 5.0 Directory installed in FreeBSD

2006-05-31 Thread ks.foong
The setclasspath.sh consist of this information, after I have issued ls -l

-rwxr-xr-x for that file.

So, it's reading and able to excute.

Further more, I am issusing that command as root, and that file is owned by
root.

 
Foong Kim Seong
 

-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 4:19 PM
To: Tomcat Users List
Subject: Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

ks.foong wrote:
 setclasspath.sh is in the directory of /Project/Tomcat/bin folder, same as
 startup.sh

 readable? I am not sure how to confirm is it readable or not but it's
there
 in the same directory.

Look at the file permissions or simply open it in a text editor (as the same

user you try to start Tomcat as, of course).

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Changing the Tomcat 5.0 Directory installed in FreeBSD

2006-05-31 Thread ks.foong
No problems. Hoping maybe others can give a hand on this...:-)

 
Foong Kim Seong
 

-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 4:31 PM
To: Tomcat Users List
Subject: Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

ks.foong wrote:
 The setclasspath.sh consist of this information, after I have issued ls -l

 -rwxr-xr-x for that file.

 So, it's reading and able to excute.

 Further more, I am issusing that command as root, and that file is owned
by
 root.

Then I'm out of ideas, sorry.

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Changing the Tomcat 5.0 Directory installed in FreeBSD

2006-05-31 Thread ks.foong
Hi Rajeev,

I am running in Tomcat5.0, I think for this version, the $catalina.sh start
is no longer applicable.

I have tried to issues this :
/Project/Tomcat/bin/$catalina.sh start
And it's replied me this:
catalina :Undefined variable


Andrew, you mentioned this :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I missed the start of this thread...

- - And the whole path is readable?

ie:
ls -l /
ls -l /nextdir
ls -l /nextdir/nextdir ?

Andrew


What do you mean by that?
The .startup.sh is within the directory of /Project/Tomcat/bin and there is
no directory anymore within /Project/Tomcat/bin anymore.


 
Foong Kim Seong
 

-Original Message-
From: Rajeev N. Jha [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 4:57 PM
To: Tomcat Users List
Subject: Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

can you try
 $catalina.sh start
That should also be able to start your server.

- Rajeev.


ks.foong wrote:
 No problems. Hoping maybe others can give a hand on this...:-)

  
 Foong Kim Seong
  

 -Original Message-
 From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 31, 2006 4:31 PM
 To: Tomcat Users List
 Subject: Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

 ks.foong wrote:
   
 The setclasspath.sh consist of this information, after I have issued ls
-l

 -rwxr-xr-x for that file.

 So, it's reading and able to excute.

 Further more, I am issusing that command as root, and that file is owned
 
 by
   
 root.
 

 Then I'm out of ideas, sorry.

 Regards
   mks

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


   


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Changing the Tomcat 5.0 Directory installed in FreeBSD

2006-05-31 Thread ks.foong
Guys, I am installing the Tomcat in FreeBSD. And I am using this command,

/usr/ports/www/Jakarta-tomcat5.0/make all install clean

I am wondering is anyone familiar with FreeBSD and maybe I can instruct the
installation to my /Project/Tomcat instead the default location which is
/usr/local/Jakarta-tomcat5.0

Any ideas?

 
Foong Kim Seong
 

-Original Message-
From: ks.foong [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 4:38 PM
To: 'Tomcat Users List'; users@tomcat.apache.org
Subject: RE: Changing the Tomcat 5.0 Directory installed in FreeBSD

No problems. Hoping maybe others can give a hand on this...:-)

 
Foong Kim Seong
 

-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 4:31 PM
To: Tomcat Users List
Subject: Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

ks.foong wrote:
 The setclasspath.sh consist of this information, after I have issued ls -l

 -rwxr-xr-x for that file.

 So, it's reading and able to excute.

 Further more, I am issusing that command as root, and that file is owned
by
 root.

Then I'm out of ideas, sorry.

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]