You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Caldarale, Charles R" <Ch...@unisys.com> on 2007/02/28 00:04:28 UTC
RE: Ant custom tasks: how to compile .java files and restart Tomcat (Tomcat6.0.9)?
> From: Daniel Gresh [mailto:dgresh@lle.rochester.edu]
> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Servlet Lifecycle
Posted by Peter Kennard <pe...@livingwork.com>.
So if a servlet is lets say in a long transaction, sending a huge
data set, and the manager is wanting to "undeploy" it,
Does it get notified while the long lasting servlet thread is sending
data so if one wants to abort it, you can truncate writing in a
controlled way and clean up the mess nicely?
Or will it wait until it is done or a timeout and you get notified
with uninit() after this?
Of course I want notification, that leaves you enough time to be nice :)
PK
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat JNI and native libraries
Posted by Luis Rivera <lu...@gmail.com>.
Hi,
As far as I understand, libraries can be placed anywhere as long as that
directory is in the path (environment variable, not classpath), while the
jni java side has to be placed either in the shared or common directories. I
have it working in the shared directory, so that Tomcat does not try to load
the libraries more than once.
--Luis R.
On 2/28/07, Andrew Pliszka <ap...@alienforceit.com> wrote:
>
> What is the best place to install JNI Java bridge and native libraries.
> We are using Linux and Tomcat 5.
>
> Thanks
> Andrew Pliszka
>
>
> Caldarale, Charles R wrote:
>
> >>From: Daniel Gresh [mailto:dgresh@lle.rochester.edu]
> >>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: users-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Tomcat JNI and native libraries
Posted by Andrew Pliszka <ap...@alienforceit.com>.
What is the best place to install JNI Java bridge and native libraries.
We are using Linux and Tomcat 5.
Thanks
Andrew Pliszka
Caldarale, Charles R wrote:
>>From: Daniel Gresh [mailto:dgresh@lle.rochester.edu]
>>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: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Ant custom tasks: how to compile .java files and restart Tomcat(Tomcat6.0.9)?
Posted by Daniel Gresh <dg...@lle.rochester.edu>.
Caldarale, Charles R wrote:
>> From: Daniel Gresh [mailto:dgresh@lle.rochester.edu]
>> 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Ant custom tasks: how to compile .java files and restart Tomcat(Tomcat6.0.9)?
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Daniel Gresh [mailto:dgresh@lle.rochester.edu]
> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Ant custom tasks: how to compile .java files and restart Tomcat
(Tomcat6.0.9)? [RESOLVED]
Posted by Daniel Gresh <dg...@lle.rochester.edu>.
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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Ant custom tasks: how to compile .java files and restart Tomcat
(Tomcat6.0.9)?
Posted by Daniel Gresh <dg...@lle.rochester.edu>.
Caldarale, Charles R wrote:
>> From: Daniel Gresh [mailto:dgresh@lle.rochester.edu]
>> 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org