Re-deploying tomcat 5.5 [message #205646] |
Wed, 12 December 2007 16:49 |
Eclipse User |
|
|
|
Originally posted by: ranavishal.gmail.com
Hello All,
Just a quick question:
Do I need to restart the server everytime I make changes in web.xml, java
file or any other configuration file like struts-config.xml
Development Env.
Eclipse wtp 2.0.1
Tomcat 5.5
PS: Tomcat configured inside the eclipse
Thanks
Vishal
|
|
|
|
|
|
|
Re: Re-deploying tomcat 5.5 [message #205717 is a reply to message #205685] |
Thu, 13 December 2007 12:21 |
Eclipse User |
|
|
|
Originally posted by: user.domain.invalid
Larry Isaacs wrote:
> Vishal Rana wrote:
>> Thanks, do we have any option to redeploy the application right from
>> the eclipse?
>>
> I'm not sure exactly what you mean by "redeploy". If you mean force a
> context reload, the answer is no. The Tomcat support in WTP currently
> doesn't support control of the Tomcat server beyond starting and
> stopping and what "control" can be accomplished via the configuration
> files.
>
> Cheers,
> Larry
Not exactly sure this is a *good* answer to this question, but I have
also been struggling with this lack of control, so I have for mature
projects switched to a pure Java project with a setup where classes are
created as required by Tomcat and and in the
apache-tomcat-6.0.14\conf\Catalina\localhost directory I have created a
file which contains:
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="C:/eclipse_projects/MyApp/web" reloadable="true"/>
This works fine for the reload scenario and for session (and other)
control I use the admin app.
This of course excludes me from all nice WTP features but give me more
control over my TomCat apps.
:) Goran Rehnlund
|
|
|
Re: Re-deploying tomcat 5.5 [message #205725 is a reply to message #205717] |
Thu, 13 December 2007 13:16 |
Eclipse User |
|
|
|
Originally posted by: wojtekmichalik.softtellco.com.pl
<path id="master-classpath">
<fileset dir="${web.dir}/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
<!-- We need the servlet API classes: -->
<!-- for Tomcat 4.1 use servlet.jar -->
<!-- for Tomcat 5.0 use servlet-api.jar -->
<!-- for Other app server - check the docs -->
<fileset dir="${appserver.home}/common/lib">
<include name="servlet*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<target name="usage">
<echo message=""/>
<echo message="${name} build file"/>
<echo message="-----------------------------------"/>
<echo message=""/>
<echo message="Available targets are:"/>
<echo message=""/>
<echo message="build --> Build the application"/>
<echo message="deploy --> Deploy application as directory"/>
<echo message="deploywar --> Deploy application as a WAR file"/>
<echo message="install --> Install application in Tomcat"/>
<echo message="reload --> Reload application in Tomcat"/>
<echo message="start --> Start Tomcat application"/>
<echo message="stop --> Stop Tomcat application"/>
<echo message="list --> List Tomcat applications"/>
<echo message=""/>
</target>
<target name="build" description="Compile main source tree java
files">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" target="1.3" debug="true"
deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
</target>
<target name="deploy" depends="build" description="Deploy
application">
<copy todir="${deploy.path}/${name}" preservelastmodified="true">
<fileset dir="${web.dir}">
<include name="**/*.*"/>
</fileset>
</copy>
</target>
<target name="deploywar" depends="build" description="Deploy
application as a WAR file">
<war destfile="${name}.war"
webxml="${web.dir}/WEB-INF/web.xml">
<fileset dir="${web.dir}">
<include name="**/*.*"/>
</fileset>
</war>
<copy todir="${deploy.path}" preservelastmodified="true">
<fileset dir=".">
<include name="*.war"/>
</fileset>
</copy>
</target>
<!-- ============================================================ == -->
<!-- Tomcat tasks - remove these if you don't have Tomcat installed -->
<!-- ============================================================ == -->
<taskdef name="install"
classname="org.apache.catalina.ant.InstallTask">
<classpath>
<path location="${appserver.home}/server/lib/catalina-
ant.jar"/>
</classpath>
</taskdef>
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask">
<classpath>
<path location="${appserver.home}/server/lib/catalina-
ant.jar"/>
</classpath>
</taskdef>
<taskdef name="list" classname="org.apache.catalina.ant.ListTask">
<classpath>
<path location="${appserver.home}/server/lib/catalina-
ant.jar"/>
</classpath>
</taskdef>
<taskdef name="start" classname="org.apache.catalina.ant.StartTask">
<classpath>
<path location="${appserver.home}/server/lib/catalina-
ant.jar"/>
</classpath>
</taskdef>
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask">
<classpath>
<path location="${appserver.home}/server/lib/catalina-
ant.jar"/>
</classpath>
</taskdef>
<target name="install" description="Install application in Tomcat">
<install url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"
war="${name}"/>
</target>
<target name="reload" description="Reload application in Tomcat">
<reload url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="start" description="Start Tomcat application">
<start url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="stop" description="Stop Tomcat application">
<stop url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="list" description="List Tomcat applications">
<list url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"/>
</target>
|
|
|
Powered by
FUDForum. Page generated in 0.04733 seconds