Hi Dan,

Thanks for your response.  Let me just make sure I heard you right:

So I have a javac target in my build.xml file.  It simply compiles code in
${source} and puts it in {$build}.  You are suggesting that I point {$build}
to the Tomcat directory?

For example, since I’m on Windows, {$build} might be:
C:\Program Files\Apache Software Foundation\Tomcat
6.0\webapps\myWebApplication\WEB-INF\classes

So lets say I’ve changed some of my servlet code.  Could I then just do this
to see it reflected: ?

ant javac
ant reload
ant gui


Finally, is this the “official” (or good) way to do this? In other words,
this isn’t a “hack” or anything?  




Daniel Gresh wrote:
> 
> James Javaman wrote:
>> Hello,
>>
>> I am trying to setup a build.xml file for a servlet.  I am using the
>> following 2 URL's as references:
>>
>> http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant
>>  
>>
>>
>> http://www.onjava.com/onjava/2003/01/08/examples/build.xml.html
>>
>>
>> So my problem is I don't understand how day-to-day development would work
>> using this build.xml file.  For example, let's say I change some code 
>> that
>> will run on the servlet in a file called: MyServlet.java.
>> What series of ant commands would I run to reflect the change? Would 
>> it be:
>> ant undeploy
>> ant deploy
>> ant gui
>>
>> I'm just asking because it seems like 'ant undeploy' and 'ant deploy' are
>> time-consuming to run if all I'm changing is one file.  I kind of 
>> confused
>> on how 'ant reload' is supposed to be used in the context of these 
>> files.  I
>> guess for 'ant reload' I would have to manually copy the output of 
>> javac to
>> the tomcat folder?  Does anyone have a more elegant build.xml file (or 
>> have
>> a suggestion for creating one.)
>>
>> Thank you very much.  A solution to this problem will no doubt save me 
>> a lot
>> of development time.
>>
> ant reload simply reloads a web application. Therefore, if you update 
> MyFile.java and compile it to 
> $CATALINA_HOME/webapps/myWebApp/WEB-INF/classes/MyFile.class, you can 
> call ant reload on that specific web application to reload the web 
> application so your changes take effect.
> 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Example-of-a-build.xml-File-for-Tomcat---tf3404338.html#a9482168
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

Reply via email to