Up until recently, I followed the process you described because it was a
"sure thing" as far as getting the right JSP pages and classes to load into
Tomcat at run-time.

Since then, Craig M. recommended the approach set out in the Tomcat
application developers guide.  I've been following that process ever since,
and I can vouch for the reliability of the process of reloading applications
without having to restart Tomcat.

You can access the Tomcat application developers guide at...

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/

There were a few hiccups I encountered with the sample build.xml and
build.properties file:

--> The documentation instructs you to define catalina.home and app.name in
build.properties, but those properties are defined in build.xml; I removed
the latter to avoid confusion as to which declarations were taking
precedence.
--> There is a means by which to declare JAR files which should be copied to
the build/WEB-INF/lib folder and included in your classpath.  It was more
convenient for me to copy my JAR files into web/WEB-INF/lib and pick up the
JAR files automatically in the classpath using a fileset tag.

Once set up properly, you can run "ant install" on your build.xml file.
That will create a build folder, copy files from your web folder (supposed
to contain all non-Java files) into the build folder, compile all Java files
in your src folder and copy the class files intto build/WEB-INF/classes,
dynamically mount your app.name context with the build folder as your
docBase.  Immediately, you can test your application using
http://localhost:8080/context/.

If you discover and error, fix it in the appropriate place (either the src
folder or the web folder).  Then run the "ant reload" task, wait a few
seconds for Tomcat to reload your application, and continue your testing.

PS:  Because "ant install" dynamically deploys your webapp into Tomcat
without creating a <Context/> in your server.xml file, you will have to run
that task again whenever Tomcat is restarted.  When you are ready to have
your application permanently deployed (or you want more control over your
<Context/> attributes), make the change to the server.xml file yourself and
point the docBase at your build folder.

----- Original Message -----
From: "John Ruffin" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 10:32
Subject: RE: Best practices - dev & deploy?


> Thanks PQ - I cleared the cache and reloaded to no avail.  I also closed
the
> brower and re-launched - same thing.
>
> I'm really interested in understanding how people go about testing?
>
> Do you develop in your source area, run Ant, then navigate to your app in
> the browser.  At this point are all your changes visible or is there
> something else that needs to be done?
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 14, 2003 11:15 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Best practices - dev & deploy?
>
>
> I guess it was cached. Try close your browser and re-launch it.
>
> Regards,
>
>
> PQ
>
> "This Guy Thinks He Knows Everything"
> "This Guy Thinks He Knows What He Is Doing"
>
> -----Original Message-----
> From: John Ruffin [mailto:[EMAIL PROTECTED]]
> Sent: February 14, 2003 12:13 PM
> To: 'Tomcat Users List'
> Subject: Best practices - dev & deploy?
>
> I running tc4.1.18, sdk1.4.0_01, struts1.1.b2 on a w2k machine.  TC runs
as
> an NT service.
>
> I created a basic myHello project - just an app with 2 jsps.  Used Ant to
> build and deploy the app but I can't see the changes unless I go through
> this crazy process of:
> (step1) removing the app using Manager
> (step2) stopping the "NT service" - Apache Tomcat4.1
> (step3) deleting the app folder under catalina_home\webapps
> (step3) deleting the appName.war file
> (step4) starting the NT service - Apache Tomcat4.1
> (step5) building the app using Ant - which of course redeploys the app
>
> <Did I mention it was crazy?>
>
> Question: What are some best practices for testing applications?
>
> I feel like I'm reinventing the wheel - there must be an easier way.
>
> BTW, if I make changes to a jsp inside the container I can see the
changes -
> but of course I don't want to do that.
>
> Thanks for your feedback.
>
>
>
> ************************************************************
> The information in this email is confidential and may be
> legally privileged. It is intended solely for the addressee,
> and access by anyone else is unauthorized.
>
> If you are not the intended recipient, any disclosure,
> copying, distribution or any action taken or omitted to be
> taken in reliance on it, is prohibited and may be unlawful.
>
> If you believe that you have received this email in error,
> please advise us by calling (901) 385 3688, or emailing
> [EMAIL PROTECTED], and then delete this message
> and all copies and backups thereof. Thank you.
> ************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ************************************************************
> The information in this email is confidential and may be
> legally privileged. It is intended solely for the addressee,
> and access by anyone else is unauthorized.
>
> If you are not the intended recipient, any disclosure,
> copying, distribution or any action taken or omitted to be
> taken in reliance on it, is prohibited and may be unlawful.
>
> If you believe that you have received this email in error,
> please advise us by calling (901) 385 3688, or emailing
> [EMAIL PROTECTED], and then delete this message
> and all copies and backups thereof. Thank you.
> ************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to