tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alice Young <aliceyoun...@yahoo.com>
Subject Re: change in local directory deployment behavior between 5.5 and 6
Date Fri, 20 Jul 2007 01:44:40 GMT
Hi Johnny,
   
  Thanks for your response. Before you wrote this I tried downloading 5.5 and discovered that
indeed there isn't any perceptable difference in the default behavior. This has me scratching
my head because I don't know what I did to get what I had before. Unfortunately the hard drive
where 5.5 resided died and during the recovery I didn't take the tomcat install, so I don't
know how I had it configured.
   
  Basically, I had it so that when I started tomcat, it would automatically make a particular
directory outside of tomcat's home dir the ROOT web app. Example:
   
  c:/myapp/WebRoot/WEB-INF
   
  So that the jsp files under WebRoot were at the root of the ROOT web application. I've looked
into it some more and it seems like I need to create a custom context.xml. However I can't
seem to find much information on how to do this at all, in the tomcat docs or in the tomcat-related
books that I have. I certainly didn't do this before so I don't know how I managed to configure
it this way.
   
  Do you have a suggestion on how to make this work? Ideally I want to start Tomcat 6 and
have it immediately pick up the webapp as ROOT even though it's outside the directory, no
copying or war-creating (since it's a big app with thousands of class files).
   
  Thanks for your help!
  Alice

Johnny Kewl <john@kewlstuff.co.za> wrote:
  
----- Original Message ----- 
From: "Alice Young" 
To: 
Sent: Sunday, July 15, 2007 5:47 PM
Subject: change in local directory deployment behavior between 5.5 and 6


> Hi,
>
> I have been searching for a solution to this problem for a while, but 
> it's difficult to search on when the keywords match so many general 
> topics.
>
> In tomcat 5.5, I was able to use manager to deploy from a directory on 
> the filesystem, and tomcat would use that directory for the source. It 
> would not copy the contents of the directory to its webapps directory. I 
> could stop tomcat, start it again and pick up changes in the class files 
> of the app. This was very quick because no file copying was going on.
>
> In tomcat 6, it now copies all of the files to the webapps directory. I 
> can no longer just stop and restart tomcat to pick up the changes in the 
> class files because tomcat has its own copy. I have to undeploy and 
> redeploy at minimum, and it takes quite some time and extra work on my 
> part.
>
> Is there a way to configure tomcat 6 get the old tomcat 5.5 behavior 
> back? Thanks for any help.
>
> Alice

Hi Alice.... how were you actually deploying it? Using an IDE, ant, HTTP?
It doesnt actually look like its changed much from 5.5 to 6... so it may 
just be the tool thats doing it different with TC6?

Anyway let me show you how I do it.... once you have this ant script setup, 
its so handy, you cant live without it.
It just so happens its actually setup now for what you need....
If my notes are not clear... the trick is just to setup the context.xml with 
its "own docBase location"... in the unpacked web app in one of your 
folders.
Then when you run this ant script... TC will use that unpacked webapp... 
just point config at the context in the webapp.

Have fun....












classpathref="deployer.classpath"/>


     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 -
        
        

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


     war="D:\\DEV\\PROJECTS\\TestRemoteIp\\dist\\TestRemoteIp.war"
     config="D:\\GARBAGE\\TestSite\\META-INF\\context.xml"
     localWar="file://D:\\GARBAGE\\TestSite"
  -->

path="/Test5"
update="true"
config="file://D:\\GARBAGE\\TestSite\\META-INF\\context.xml"
/>




       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



       
---------------------------------
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message