• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

web application deployment ?

Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am trying to deploy on iAS6.x a web application. I'd appreciate help on the following :
1.My src and class files are in a different directory. When deploying a servlet on iAS,I chose a yet another directory for the war file. But, after deployment iAS created its required package structure under ias/APPS/module/<appName>/etc..
This is duplicity of my class files. Why iAS does this when paths are mentioned at deployment? Can I change this?
2.During development, when the servlet code changes, how do I make iAS to pick up the changed code?(cos as I said above my build puts classes in a diff directory). Do I need to deploy again ?
(FYI:I have already changed the key on kregedit for dynamic load of classes.)
3. I dont want to use the deploy tool of iAS again and again. How do I quickly make an update or new deployment instead of using the tool ?
4. Any step-step examples for the above is really helpful.
Thanks for your time.
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q #1 (why does iAS put the class files under APPS)
The WAR is a standalone snapshot of your application. It does not contain a "pointer" back to your development directory. In production, you won't have your development classes available on the same box. And even if you did, you wouldn't want production to update any time you changed a .class file.
The standard development cycle (excluding SCM) outlined by J2EE is develop -> compile -> assemble -> deploy. So you _will_ have multiple copies of you .class files. One in the development environment. One in the assembly environment (embedded in the WAR), and one in the production (deployment) environment.
By the way, I'd recommend assembling the WAR into the EAR. It resolves some of the missing items in the WAR, such as context root.
Q#2 (how do I make iAS pick up .class changes, since APPS is a separate copy.)
Personally, I use a "quick deploy" Ant target that copies the files from my development environment to my unit test environment. Since it is just a file copy, it is effectively instantaneous.
Alternatively, you could change your compilation options to compile directly into APPS, but this doesn't seem like a good idea to me.
Q#3: (I don't want to use deploytool repeatedly.)
You aren't alone. GUIs are never good for repeated use. Most people I know use deploytool to generate the original deployment descriptors (if at all) and then use command line tools from then on.
The one I recommend, and talk about in my book, is Ant. There are plenty of samples of Ant build files provided with iAS. You could use make, or any number of other tools, but Ant has built in Java compiler and WAR file support.
One you have a web.xml file and ias-web.xml file (and whatever other DD's you need), you can just assemble the WAR file by hand if you choose.
Q#4 (step-by-step examples)
Most of the iAS samples walk you through deployment step by step. That will give you an idea of how to use Ant.
Chapter 9 of my book also goes through many of these steps. It specifically details how to create an Ant "hot deploy" target, the concepts and purposes of application packaging, and what is happening behind the scenes of the APPS directory.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic