Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Im having trouble setting up the tomcat server on my mac. Can someone help?

Im trying to build a website with java for the back end but Im lost trying to set up tomcat on my mac

Would you mind posting what you have so far and the specific errors you're getting?

Hey Andrew Wiley

I recommend you provide the errors you are getting as Shadd asked but to get you started I have set up tomcat 7 in the following way:

  1. installed homebrew package manager
  2. ran brew update
  3. ran brew tap homebrew/versions
  4. ran brew install tomcat7

You can now find your configuration in: /usr/local/Cellar/tomcat7/{version number}/libexec/conf

to deploy a web app you can drop a .war file in the /usr/local/Cellar/tomcat7/{version number}/libexec/webapps folder and run catalina run

If you're having issues make sure you check server.xml and web.xml are configured properly to route traffic to your web application (find these in /usr/local/Cellar/tomcat7/{version number}/libexec/conf)

  • typical issues will be with the context path not being set (google it for more information)

This should get you started, however, I recommend looking into tomcat deployment best practices to further your knowledge as what I have described may not fit best practices. I hope this points you in the right direction.