Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 71337 invoked from network); 18 Dec 2009 23:40:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Dec 2009 23:40:12 -0000 Received: (qmail 63898 invoked by uid 500); 18 Dec 2009 23:40:08 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 63806 invoked by uid 500); 18 Dec 2009 23:40:08 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 63793 invoked by uid 99); 18 Dec 2009 23:40:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 23:40:08 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [204.15.49.138] (HELO relay.colo.teklinks.com) (204.15.49.138) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 23:39:55 +0000 Received: from ex01.acteksoft.com (mail.acteksoft.com [208.72.134.135]) by relay.colo.teklinks.com (Postfix) with ESMTP id 341521C047 for ; Fri, 18 Dec 2009 17:39:34 -0600 (CST) Received: from ex01.acteksoft.com ([192.168.1.251]) by ex01.acteksoft.com ([192.168.1.251]) with mapi; Fri, 18 Dec 2009 17:39:34 -0600 From: Clay McCoy To: "users@tomcat.apache.org" Date: Fri, 18 Dec 2009 17:39:32 -0600 Subject: Getting 404's on embedded Tomcat. Thread-Topic: Getting 404's on embedded Tomcat. Thread-Index: AcqAO1kd5XFDL4FS8EicxX4ZW3tiBQ== Message-ID: Accept-Language: en-US Content-Language: en X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org OS X 10.6.2, Java 1.6.0_17, tomcat 6.0.18 I've spent hours researching how to configure embedded Tomcat. It starts u= p fine, Spring config works, but I get 404's when loading the jsps ( http:/= /localhost:8080/App/test.jsp) . I have the code that I am using to start T= omcat here: http://gist.github.com/259737 There is a directory generated from where I run the above script. (work/loc= alEngine/localhost/App) but nothing gets copied there. Are my JSPs suppos= ed to end up there? There are no errors on the console and no log files. If I use a context that really doesn't exist I get a blank screen rather th= an a 404. ( http://localhost:8080/App1234/test.jsp) I suspect that my configuration is wrong because I am making a lot of guess= es. All I can find is the api docs and some broken examples. Can anyone ex= plain or point me to better documentation? I have some specific questions: I'm pretty sure what I am passing to creatHost is wrong. Embedded.createHost(...) requires an appBase - "Absolute pathname to the ap= plication base directory for this virtual host." What is my appBase? My project is a typical Maven project with a Web module. Do I need Catalina_Home setup programatically or otherwise? I have no Tomc= at actually installed. I only reference Tomcat in my Maven pom. Do I need a sever.xml somewhere. Currently I just have a web.xml. The best information that I have found is these examples: http://stackoverflow.com/questions/640022/howto-embed-tomcat-6 (I'm using = the same Maven pom dependencies) http://raibledesigns.com/rd/entry/jetty_6_x_versus_tomcat And the apis: http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/startup/Emb= edded.html#createConnector(java.lang.String, int, boolean) I've seen this question asked many times without answers. http://mail-archives.apache.org/mod_mbox/tomcat-users/200606.mbox/<448F0710= .6010408@networkcar.com> Here a guy in the comments shows his emedded startup code, http://raibledes= igns.com/rd/entry/jetty_6_x_versus_tomcat He says"The bit about the defaul= t web.xml is to get the standard behaviors you'd expect from Tomcat, like p= rocessing JSPs. " Why did he need to resort to this to get his jsps to wor= k? Thanks in advance for any help! Clay --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org