-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Gibran,
On 10/2/14 5:04 PM, Gibran Castillo wrote: > To fix the problem I put the .jar files in tomcat's lib directory > and it works.... best way to do this is like you said to put the > *.jar files in the WEB-INF/lib directory, build the project as WAR > and deploy the war file in Tomcat .... Where do I place the .war > file in Tomcat? in the 'webapps' directory? Yes, you would put the WAR file into Tomcat's webapps/ directory. If you do that, you won't need the separate donow62.xml file. - -chris > On Thu, Oct 2, 2014 at 4:11 PM, Christopher Schultz < > ch...@christopherschultz.net> wrote: > > Gibran, > > On 10/2/14 3:59 PM, Gibran Castillo wrote: >>>> I deployed donow62 Spring MVC app into Tomcat by placing >>>> donow62.xml file in $CATALINA_HOME/conf/Catalina/localhost >>>> >>>> The contents of donow62.xml are as follow: <Context >>>> > docBase="/Users/gibranecastillo/Documents/workspace/CollegeLife/donow62/website" >>>> >>>> > > reloadable="true"/> >>>> >>>> They basically point to the website directory in the spring >>>> mvc project in my eclipse workspace. > > What is the directory structure of ".../donow62/website"? > >>>> I looked at the Tomcat logs and it says donow62 deployed >>>> successfully. In the "Tomcat Web Application Manager" I can >>>> see /donow62 listed there. >>>> >>>> When I clicked on /donow62 it sends me to this URL >>>> http://localhost:8080/donow62/ but instead of getting >>>> expected result and the web page, I get HTTP Status 500 [see >>>> web browser log below] >>>> >>>> My Spring MVC "donow62" app is using JSTL and it is in the >>>> classpath. Using Eclipse on the donow62 project I created >>>> User Libraries that reference all the dependencies for >>>> donow62. The SERVLET user library has <> el-api.jar - >>>> /Library/Tomcat/apache-tomcat-8.0.12/lib/el-api.jar <> >>>> jasper.jar - >>>> /Library/Tomcat/apache-tomcat-8.0.12/lib/jasper.jar <> >>>> jasper-el.jar - >>>> /Library/Tomcat/apache-tomcat-8.0.12/lib/jasper-el.jar <> >>>> jsp-api.jar - >>>> /Library/Tomcat/apache-tomcat-8.0.12/lib/jsp-api.jar <> >>>> servlet-api.jar - >>>> /Library/Tomcat/apache-tomcat-8.0.12/lib/servlet-api.jar <> >>>> javax-servlet.jsp.jstl-1.2.1.jar - >>>> > /Users/gibranecastillo/Documents/java/servlet/javax-servlet.jsp.jstl-1.2.1.jar >>>> >>>> >>>> > > The exception is basically saying that the donow62 app is missing the JSTL >>>> dependency, the jar, any suggestions on how fix this are >>>> welcome. > > Is the JSTL JAR file in > > /Users/gibranecastillo/Documents/workspace/CollegeLife/donow62/website/WEB-INF/lib? > > If not, you aren't actually using it. > > Although I don't do it myself, Eclipse is pretty good at deploying > web applications to Tomcat itself: you shouldn't have to even > create your own context.xml file and fill it with data. > > If you want to do everything manually (believe me, I understand), > then you'll need to make sure that your Eclipse project > successfully builds to a WAR-like structure which contains, among > other things, a WEB-INF/ directory and all of the things that > should be in there (like lib/*.jar). If you don't do that, then you > won't really be deploying a web application... you'll effectively > be mapping a directory on the disk into a URL space and getting no > other benefits. > > -chris >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJULcAeAAoJEBzwKT+lPKRY1+cQAMY1dP2G+IjwFLciEUkWRUZ0 AS9MmQZT6QJ4EtnAjBeby3Uv8So9XzWu4ZKYjUT4QLPntXFswnnkVNW3DKHNXxhq uxHYLBhaZRTDYmHpkuNHdH5nX8Cil5wy7ToXqBPmTnY/DxDghjU6Vlzb19oWpkVM HyM8Ky2CnGqoKtr0fTw8hOzpsi/2F9mgMM7j+cuWmMQoMKpAho8pc5UuBCSU55wG JJgaTGf0UNsm9X6M4YB/ccsprskdJ1LEp8xou7uOi6geMCJ57sXDlTBSQAelXgyR YrlH7vVE0rs1+8bdLnrMTK+eTNOTWgNFxEpH8gzsOy3J5PbfZPYN2SRL+r1Fmomx QdjF7K1gRfCLBwG4fJuilkpwjPkUpFlCv4RFFrr6ZQjf1DSNzZgZ+9+LFgZ8Sxzb ACXGFErutuFDYBod/HLXYwwX4LrlZ3KlAHV5C9MNQHQzJao33batHIak9S856yiv ND/Xqm5V0IgTPEcjDwHGMV5/lkCJHJKzJBrbchBDJt7uR4tyvulCet508rmz6fVe mGcK6jvd1Wi/6nOTULycv0Ufk55dHl/K8nBUi7xUYFz22Yo0cHmXtkcwnvAswmT2 cqjM2/Ypu4GPT4nGk8Txcick5rI+4Z42U00hn3h0mp0w75Wn7n3cAoiMWGyIn6s8 WRSSlu7KeT+EDzmINuko =Knbb -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org