Re: [jetty-user] Missing something about deployment
Howard Lewis Ship <[email protected]> Fri, 12 Aug 2011 17:08:55 -0700
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <CACd-vsN+_+78ttsoNrjLFuXyKppKfs_wvgAd6eb4Se7ZJmJiug@mail.gmail.com> |
I was thrashing, running a bunch of different things, so I'm not sure when the log file got created. But I'll try your suggestion. Glad I didn't have a client breathing down my neck, Jetty is supposed to be nice and easy! On Fri, Aug 12, 2011 at 2:50 PM, Joakim Erdfelt <[email protected]> wrote: > I can tell from the fact that you have a logs/2011_08_12.stderrout.log being > produced that you are running a customized configuration of jetty. (ie, not > stock). > The key pieces for you are going to be in the start.ini > You will *NEED* the following lines. (at a bare minimum) > --(snip)-- > OPTIONS=Server,resources,ext > etc/jetty.xml > etc/jetty-deploy.xml > etc/jetty-webapps.xml > --(snip)-- > jetty.xml sets up the server, including ids for the root context handlers > (needed by deployment) > jetty-deploy.xml sets up the deployment manager for non-static deployments > (like you want to do) > jetty-webapps.xml sets up a AppProvider for the deployment manager that > looks for files matching ${jetty.home}/webapps/*.war and deploys them to a > context path that is the same as the webapp's filename (sans ending ".war") > - Joakim > On Fri, Aug 12, 2011 at 2:42 PM, Joakim Erdfelt <[email protected]> wrote: >> >> Odd, this works on my Linux workstation, my MacBookPro, and my Windows 7 >> laptop. >> http://joakim.erdfelt.com/uploads/demo_tapestry.jpg (on OSX, like you are >> trying) >> Do you see any errors? >> Do you see a line like this? >> 2011-08-12 14:30:51.276:INFO::Started >> [email protected]:8080 STARTING >> If you are comfortable with slf4j, you can toss slf4j-api and one of the >> implementations (slf4j-simple or slf4j-log4j or slf4j-jdk14 or slf4j-jcl or >> logback) into the ${jetty.home}/lib/ext directory and get *LOADS* more >> logging. >> - Joakim >> On Fri, Aug 12, 2011 at 2:31 PM, Howard Lewis Ship <[email protected]> >> wrote: >>> >>> See, that didn't work for me ... minor differences in Jetty version, >>> and I'm deploying a minimal Tapestry 5 app. I did read the docs and >>> did things that made sense and it doesn't work. >>> >>> On Fri, Aug 12, 2011 at 2:28 PM, Joakim Erdfelt <[email protected]> >>> wrote: >>> > Here ya go. >>> > demo-tapestry-on-jetty.sh >>> > --(snip)-- >>> > #!/bin/bash >>> > curl -O >>> > >>> > http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/7.4.5.v20110725/jetty-distribution-7.4.5.v20110725.tar.gz >>> > tar -zxvf jetty-distribution-7.4.5.v20110725.tar.gz >>> > cd jetty-distribution-7.4.5.v20110725/ >>> > # Grab Tapestry Demo WAR (put into ${jetty.home}/webapps/) >>> > cd webapps >>> > curl -O >>> > >>> > http://repo1.maven.org/maven2/org/apache/tapestry/tapestry-TimeTracker/4.1.6/tapestry-TimeTracker-4.1.6.war >>> > # Grab commons-logging lib (as tapestry-TimeTracker expects it in the >>> > server >>> > side libraries) >>> > cd ../lib/ext >>> > curl -O >>> > >>> > http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar >>> > # Start jetty >>> > java -jar start.jar >>> > open http://localhost:8080/tapestry-TimeTracker-4.1.6/ >>> > --(snip)-- >>> > - Joakim >>> > >>> > On Fri, Aug 12, 2011 at 2:09 PM, Howard Lewis Ship <[email protected]> >>> > wrote: >>> >> >>> >> I have Jetty 7.4.3 installed as ~/lib/jetty >>> >> >>> >> I copy my war file to ~/lib/jetty/webapps >>> >> >>> >> From ~/lib/jetty I execute java -jar start.jar >>> >> >>> >> Jetty starts up for port 8080 >>> >> >>> >> However, http://localhost:8080/ returns a 404 response and the message >>> >> "No context on this server matched or handled this request" >>> >> >>> >> The same .war file deploys into Tomcat 5.5. >>> >> >>> >> I've even set JETTY_HOME. >>> >> >>> >> Logs looks fine: >>> >> >>> >> $ tail -f logs/2011_08_12.stderrout.log >>> >> 2011-08-12 13:39:41.667:INFO::jetty-7.4.3.v20110701 >>> >> 2011-08-12 13:39:41.713:INFO::Started >>> >> [email protected]:8080 STARTING >>> >> 2011-08-12 13:40:35.167:INFO::Graceful shutdown >>> >> [email protected]:8080 STARTED >>> >> >>> >> >>> >> This is Mac OS X Lion, Java 1.6 >>> >> >>> >> I must be missing something boneheaded here, but I've been pounding my >>> >> head over this for half an hour. >>> >> >>> >> -- >>> >> Howard M. Lewis Ship >>> >> >>> >> Creator of Apache Tapestry >>> >> >>> >> The source for Tapestry training, mentoring and support. Contact me to >>> >> learn how I can get you up and productive in Tapestry fast! >>> >> >>> >> (971) 678-5210 >>> >> http://howardlewisship.com >>> >> >>> >> --------------------------------------------------------------------- >>> >> To unsubscribe from this list, please visit: >>> >> >>> >> http://xircles.codehaus.org/manage_email >>> >> >>> >> >>> > >>> > >>> >>> >>> >>> -- >>> Howard M. Lewis Ship >>> >>> Creator of Apache Tapestry >>> >>> The source for Tapestry training, mentoring and support. Contact me to >>> learn how I can get you up and productive in Tapestry fast! >>> >>> (971) 678-5210 >>> http://howardlewisship.com >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >> > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email