You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Charles Brunson <ch...@sun.com> on 2002/05/01 18:08:41 UTC

start tomcat target

I'm trying to use Cactus's runservertests task so I've created
a start_tomcat target in my build.xml. I basically copied the
one from the cactus web page.

What I'm finding is that when it starts tomcat it just sits there
because it has no way to background the java process. Am I missing
something here? I'm wondering how others have gotten this to work.

Here's my start_tomcat target:

   <target name="start_tomcat">
     <java classname="org.apache.catalina.startup.Bootstrap" fork="yes"
           jvm="${net-nile.jdk_home}/bin/java">
       <jvmarg value="-Dcatalina.home=${testx.tomcat_home}"/>
       <jvmarg value="-Dcatalina.base=${testx.tomcat_base}"/>
       <arg value="start"/>
       <classpath>
         <fileset refid="net-nile.jdk.classpath"/>
         <fileset dir="${testx.tomcat_home}">
           <include name="bin/bootstrap.jar"/>
         </fileset>
       </classpath>
     </java>
   </target>





-- 
					Chuck Brunson
					x56912
					719-277-6912
					charles.brunson@sun.com
					AIM: chuck9206


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: start tomcat target

Posted by la...@masq.ca.
On  1 May, Rajagopal. V wrote:
> Basically runservertests starts the Web Container if
> its not started already. There is another attribute
> that goes in runservertest called "testTarget" which
> points to a Junit test target. This is the one which
> specifies which classes to test. 
> 
> Not sure if this answers ur question!!;-)
> 

There is also a parameter testURL in runservertests which is used to
determine if the Web server is up or not. Once there is a positive answer,
your tests are run then the server is stopped. If your testURL is incorrect,
you will get the behaviour you describe.

L

-- 
Laurent Duperval <ma...@masq.ca>

Why delay until tomorrow what can be delayed until the day after?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: start tomcat target

Posted by "Rajagopal. V" <ra...@yahoo.com>.
Basically runservertests starts the Web Container if
its not started already. There is another attribute
that goes in runservertest called "testTarget" which
points to a Junit test target. This is the one which
specifies which classes to test. 

Not sure if this answers ur question!!;-)

Cheers
Raj
--- Charles Brunson <ch...@sun.com> wrote:
> I'm trying to use Cactus's runservertests task so
> I've created
> a start_tomcat target in my build.xml. I basically
> copied the
> one from the cactus web page.
> 
> What I'm finding is that when it starts tomcat it
> just sits there
> because it has no way to background the java
> process. Am I missing
> something here? I'm wondering how others have gotten
> this to work.
> 
> Here's my start_tomcat target:
> 
>    <target name="start_tomcat">
>      <java
> classname="org.apache.catalina.startup.Bootstrap"
> fork="yes"
>            jvm="${net-nile.jdk_home}/bin/java">
>        <jvmarg
> value="-Dcatalina.home=${testx.tomcat_home}"/>
>        <jvmarg
> value="-Dcatalina.base=${testx.tomcat_base}"/>
>        <arg value="start"/>
>        <classpath>
>          <fileset refid="net-nile.jdk.classpath"/>
>          <fileset dir="${testx.tomcat_home}">
>            <include name="bin/bootstrap.jar"/>
>          </fileset>
>        </classpath>
>      </java>
>    </target>
> 
> 
> 
> 
> 
> -- 
> 					Chuck Brunson
> 					x56912
> 					719-277-6912
> 					charles.brunson@sun.com
> 					AIM: chuck9206
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: start tomcat target

Posted by Vincent Massol <vm...@octo.com>.
Charles,

I believe it seems to hang simply because the URL you have defined in
testURL is not a valid URL and thus the runservertests task thinks the
server is not yet started. I don't think it is a problem of background
process as it works well here and you're using the fork="yes" attribute.

You can start Ant in debug mode if you wish to get some debug info from
the runservertests task (ant -debug your_target).

Thanks
-Vincent

> -----Original Message-----
> From: Charles Brunson [mailto:charles.brunson@sun.com]
> Sent: 01 May 2002 17:09
> To: cactus-user@jakarta.apache.org
> Subject: start tomcat target
> 
> I'm trying to use Cactus's runservertests task so I've created
> a start_tomcat target in my build.xml. I basically copied the
> one from the cactus web page.
> 
> What I'm finding is that when it starts tomcat it just sits there
> because it has no way to background the java process. Am I missing
> something here? I'm wondering how others have gotten this to work.
> 
> Here's my start_tomcat target:
> 
>    <target name="start_tomcat">
>      <java classname="org.apache.catalina.startup.Bootstrap"
fork="yes"
>            jvm="${net-nile.jdk_home}/bin/java">
>        <jvmarg value="-Dcatalina.home=${testx.tomcat_home}"/>
>        <jvmarg value="-Dcatalina.base=${testx.tomcat_base}"/>
>        <arg value="start"/>
>        <classpath>
>          <fileset refid="net-nile.jdk.classpath"/>
>          <fileset dir="${testx.tomcat_home}">
>            <include name="bin/bootstrap.jar"/>
>          </fileset>
>        </classpath>
>      </java>
>    </target>
> 
> 
> 
> 
> 
> --
> 					Chuck Brunson
> 					x56912
> 					719-277-6912
> 					charles.brunson@sun.com
> 					AIM: chuck9206
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>