tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: Admin application in Tomcat 5.5 (dead?)
Date Thu, 01 Nov 2007 07:00:05 GMT





---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------

Hi Chris....
At the bottom of this, I stuck some ant script...
Its not pretty, but if u play a little.... its very useful.

I'm thinking you can get the script going then just call the ant tasks from 
your test program...

Have fun...

----- Original Message ----- 
From: "Christopher Schultz" <chris@christopherschultz.net>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Wednesday, October 31, 2007 5:52 PM
Subject: Admin application in Tomcat 5.5 (dead?)


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> All,
>
> For the first time ever, I have the need to use the Tomcat admin
> application: I have a project whose whole unit testing capability
> revolves around being able to deploy webapps for testing to a running
> Tomcat instance using the admin application.
>
> My understanding is that the admin app is basically dead.
>
> I downloaded the admin app from the TC 5.5 download page and it doesn't
> run in a TC instance with nothing else in it:
>
> java.lang.NoClassDefFoundError: org/apache/commons/modeler/Registry
>        at java.lang.Class.getDeclaredMethods0(Native Method)
>        at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
>        at java.lang.Class.getMethod0(Class.java:2642)
>        at java.lang.Class.getMethod(Class.java:1579)
>        at
> org.apache.commons.beanutils.MethodUtils.getMatchingAccessibleMethod(MethodUtils.java:535)
>        at
> org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:209)
>        at
> org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:625)
>
> (etc.)
>
> The manager application comes with no libraries, so it's no surprise
> that it can't find some library.
>
> Is the admin app really dead? If so, why is it (still) available for
> download from the TC 5.5 page. If it /is/ dead, does any other product
> feature the capabilities required for using the Catalina Ant tasks such
> as install/deploy and undeploy/remove? I know that, say, Lambda Probe
> can deploy/undeploy, but do I have to re-write all the test targets in
> order to do that?
>
> Thanks,
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHKKSp9CaO5/Lv0PARAk7EAJ9dQseEg3ORBHyv9DjeGg6W1kPvygCfe4Jb
> FI2jbNLVmQ/y5jt3MJNW4iI=
> =8s4A
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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
>
>

===============VERY USEFUL ANT SCRIPT================

<project name="Deployer" default="deploy" basedir=".">

  <path id="deployer.classpath">
    <fileset dir="${basedir}/lib">
      <include name="*.jar"/>
    </fileset>
  </path>

  <taskdef resource="org/apache/catalina/ant/catalina.tasks"
           classpathref="deployer.classpath"/>


  <!-- point url at manager
     change username and password to Tomcat Admin
     war - is the path to the thing you trying to install
     dont change update - it makes it undeploy existing first
     path - is the Context (the uri you want it to be)
     config - points via a context file that will be used as the docbase
      if you use config you dont use war or localWar
      ie it will point tc at the existing installation that you have at that 
docBase
      - ie context.xml looks like this -
        <?xml version="1.0" encoding="UTF-8"?>
        <Context docBase="D:\GARBAGE\TestSite" path="/Ignored"/>

     localWar - will move the contents of your unpacked web app to tc

     In Netbeans right click and run task 'deploy'

     If you dont like ant then this will also work
     http://localhost:8080/manager/deploy?config=file://D:\\GARBAGE\\TestSite\\META-INF\\context.xml&path=/Test88
  -->


  <!-- sample configs
     war="D:\\DEV\\PROJECTS\\TestRemoteIp\\dist\\TestRemoteIp.war"
     config="D:\\GARBAGE\\TestSite\\META-INF\\context.xml"
     localWar="file://D:\\GARBAGE\\TestSite"
  -->
  <target name="deploy" description="Deploy web application">
    <deploy url="http://localhost:8080/manager" username="admin" password=""
            path="/Test5"
            update="true"
            config="file://D:\\GARBAGE\\TestSite\\META-INF\\context.xml"
            />
  </target>

</project>
  <!-- MAKE a simple java application
       make a "lib" folder under the application folder
       add
        catalina-ant.jar
        catalina-deployer.jar
        el-api.jar
        jasper.jar
        jasper-el.jar
        jsp-api.jar
        servlet-api.jar
        tomcat-juli.jar

       They are all in your Tomcat Libs....
  -->


---------------------------------------------------------------------
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


Mime
View raw message