Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

(re)Deploying struts apps

 
Ranch Hand
Posts: 420
  • Mark post as helpful
  • send pies
  • 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 /192.168.1.3:8080/cdmanager
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.
Thanks,
Siegfried
 
Author
Posts: 56
  • Mark post as helpful
  • send pies
  • 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.
HTH
Sue
 
To do a great right, do a little wrong - shakepeare. twisted little ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic