This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

(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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!