Re: Ant custom tasks: how to compile .java files and restart Tomcat(Tomcat6.0.9)?

2007-03-01 Thread Daniel Gresh

Caldarale, Charles R wrote:
From: Daniel Gresh [mailto:[EMAIL PROTECTED] 
Subject: Re: Ant custom tasks: how to compile .java files and 
restart Tomcat(Tomcat6.0.9)?


Is webapps/[appname], where [appname]=ROOT a web application? 
If so, I can just use reload when I deploy new .class files

without ever having to restart Tomcat, right?



Correct on both counts.  Every directory or .war file immediately under
the Host appBase directory is a webapp, even if it doesn't have a
WEB-INF or other spec-defined structure.  Very useful for deploying
apps that are nothing but static content.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



  

Excellent, thanks a lot for the help.

I realize the other question I had which I posted in my previous reply 
is better asked in a new thread. I'll look into it more before I post it 
though to see if I can resolve it.


Thanks again,
Dan

-
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: Ant custom tasks: how to compile .java files and restart Tomcat (Tomcat6.0.9)? [RESOLVED]

2007-03-01 Thread Daniel Gresh
Daniel Gresh wrote: 

Alright, here is where I am now.

I edited my build.xml file to include a reload command to reload my 
$CATALINA_HOME/webapps/ROOT path. I go to the directory where my .java 
files are and type ant reload. Everything in the build.xml file 
works fine until it reaches reload. Once it reaches reload, I get the 
following message:


reload:
   [reload] FAIL - No context exists for path 
/u/dgresh/apache-tomcat-6.0.9/webapps/ROOT


BUILD FAILED
/u/dgresh/dev/kdb/src/kdb4/build.xml:44: FAIL - No context exists for 
path /u/dgresh/apache-tomcat-6.0.9/webapps/ROOT


I do not understand this. In the example build.xml file provided on 
the Apache Tomcat website, it says this:


 The reload signals the specified application Tomcat 5 to shut 
itself down

 and reload. This can be useful when the web application context is not
 reloadable and you have updated classes or property files in the
 /WEB-INF/classes directory or when you have added or updated jar 
files in the

 /WEB-INF/lib directory.


I am updating classes in the /WEB-INF/classes directory, which is why 
I want to reload the application. Is there something I am missing? Is 
there something I need to include in $CATALINA_HOME/webapps/ROOT to 
make it a web application so Ant can recognize the context?


Thanks for the help,
Dan

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



Hi list,

I resolved this problem. It turns out that I shouldn't have specified 
the full path; I took another look at the Tomcat docs and the 
manager/html page, and realized that when I run a manager task it will 
automatically read from the $CATALINA_HOME/webapps directory. Therefore, 
I changed my path in build.xml to /, and voila -- it reloaded ROOT! 
Now I can create my own webapp separate from ROOT, and use Ant tasks!


Thanks a lot for the help you've been giving me as I'm getting familiar 
with Tomcat,

Dan

-
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: Ant custom tasks: how to compile .java files and restart Tomcat (Tomcat6.0.9)?

2007-02-28 Thread Daniel Gresh

Caldarale, Charles R wrote:
From: Daniel Gresh [mailto:[EMAIL PROTECTED] 
Subject: Ant custom tasks: how to compile .java files and 
restart Tomcat (Tomcat6.0.9)?


I have a src directory for my .java files that I wish 
to compile to .class files and simply store them on 
$CATALINA_HOME/webapps/ROOT for now.



Immediately under a webapp directory is not an appropriate location for
class files - ever.  They should go into
webapps/[appname]/WEB-INF/classes, as defined by the servlet spec.
  
Ah sorry about this - my files are under /WEB-INF/classes. I forgot to 
specify this.
  
However, I am not necessarily restarting an app; I 
wish to restart Tomcat.



Why?  There's no reason to do so, if all you're doing is updating the
app.  Restarting Tomcat requires running the shutdown and startup
scripts.
  
I know restarting Tomcat requires running the shutdown and startup 
scripts. The reason I want to restart Tomcat is because I will be 
deploying/updating  wait.


Is webapps/[appname], where [appname]=ROOT a web application? If so, I 
can just use reload when I deploy new .class files without ever having 
to restart Tomcat, right?


Wow, that realization just hit me like a truck.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



  

Alright, here is where I am now.

I edited my build.xml file to include a reload command to reload my 
$CATALINA_HOME/webapps/ROOT path. I go to the directory where my .java 
files are and type ant reload. Everything in the build.xml file works 
fine until it reaches reload. Once it reaches reload, I get the 
following message:


reload:
   [reload] FAIL - No context exists for path 
/u/dgresh/apache-tomcat-6.0.9/webapps/ROOT


BUILD FAILED
/u/dgresh/dev/kdb/src/kdb4/build.xml:44: FAIL - No context exists for 
path /u/dgresh/apache-tomcat-6.0.9/webapps/ROOT


I do not understand this. In the example build.xml file provided on the 
Apache Tomcat website, it says this:


 The reload signals the specified application Tomcat 5 to shut itself down
 and reload. This can be useful when the web application context is not
 reloadable and you have updated classes or property files in the
 /WEB-INF/classes directory or when you have added or updated jar files in the
 /WEB-INF/lib directory.


I am updating classes in the /WEB-INF/classes directory, which is why I 
want to reload the application. Is there something I am missing? Is 
there something I need to include in $CATALINA_HOME/webapps/ROOT to make 
it a web application so Ant can recognize the context?


Thanks for the help,
Dan

-
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: Ant custom tasks: how to compile .java files and restart Tomcat(Tomcat6.0.9)?

2007-02-28 Thread Caldarale, Charles R
 From: Daniel Gresh [mailto:[EMAIL PROTECTED] 
 Subject: Re: Ant custom tasks: how to compile .java files and 
 restart Tomcat(Tomcat6.0.9)?
 
 Is webapps/[appname], where [appname]=ROOT a web application? 
 If so, I can just use reload when I deploy new .class files
 without ever having to restart Tomcat, right?

Correct on both counts.  Every directory or .war file immediately under
the Host appBase directory is a webapp, even if it doesn't have a
WEB-INF or other spec-defined structure.  Very useful for deploying
apps that are nothing but static content.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
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: Ant custom tasks: how to compile .java files and restart Tomcat (Tomcat6.0.9)?

2007-02-27 Thread Caldarale, Charles R
 From: Daniel Gresh [mailto:[EMAIL PROTECTED] 
 Subject: Ant custom tasks: how to compile .java files and 
 restart Tomcat (Tomcat6.0.9)?
 
 I have a src directory for my .java files that I wish 
 to compile to .class files and simply store them on 
 $CATALINA_HOME/webapps/ROOT for now.

Immediately under a webapp directory is not an appropriate location for
class files - ever.  They should go into
webapps/[appname]/WEB-INF/classes, as defined by the servlet spec.

 However, I am not necessarily restarting an app; I 
 wish to restart Tomcat.

Why?  There's no reason to do so, if all you're doing is updating the
app.  Restarting Tomcat requires running the shutdown and startup
scripts.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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