• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

(re)Deploying struts apps

Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having a terrible time with some basic struts examples.
I first I tried Sue Spielman's examples and dumped war file into the webapps directory and pointed my directory /
Hmm... that did not work and Tomcat v5 burped with a stack trace. So I tried again with tomcat 4.1.18 and that did not help either -- I got another stack trace.
So then I tried the war file from the banking example from the Oreilly book on struts. That worked so tried editing the jsp file with by adding ***Siegfried's Modifications***, ran the ant file, copied the war file to the webapps directory again. The modifications would not manifest.... I tried everything I could think of: refreshing the browser, rebooting tomcat...
Hmm... so then I went whitewater kayaking when when I came back, I fired up tomcat 4.1.18 and there were my changes to the banking example!
Hmm.... so then I made some more changes to the login.jsp and ran the build.xml file and could not see my most recent changes -- even after restarting tomcat and flushing by browser.
So then I tried undeploying the banking example by deleting it from the webapps directory (while tomcat is running) and copying the war file again. That did not work -- now I cannot run the application at all. What is the proper way to undeploy an application?
What is the proper way to redeploy an app so you can determine if it working right?
I finally discovered that I need to stop tomcat, delete the war file and the corresponding war file in the webapps directory, rebuilding the war file and copy it into the webapps directory and fire up tomcat again.
Isn't there an easier way?
I would sure be nice if the tutorial and documentation authors would make this information overt in chapter one and save the theory of MVC and action servlet architectures for later chapters.
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Siegfried. Sorry you had trouble starting the CdManager application. I've run it in Tomcat 5 so I know that it works. I included the details on the sample app on page 2 of the preface...so that's definately prior to chapter 1 . There is a setup document included in the download that includes all of the prereq setup for using the application. It works using MySQL so maybe you didn't have the database installed and/or running.
Tomcat 5.0 wil recognize newer war files and redeploy it. If you are using 4.x there is a deploy target included in my build.xml file that does all of the sets for you. Maybe you want to take a look at it and add it into your build.
Evildoers! Eat my justice! And this tiny ad's justice too!
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic