Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to run Tomcat on mac

 
Ilakya Mukunth
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to run tomcat server 6 neither from my eclipse nor from my browser. When i try to enter http://localhost:8080, it says "description The requested resource (/) is not available.". I have included the screen shot with his message. I am using mac 10.8. I am very beginner to Eclipse and Servlets. Just started the configuration and tried to run Hello World. And nothing worked out. I am very discouraged to pursue my beginning with Servlets. If you help me to resolve the issue, it would be of GREAT help. :-(

Thanks in advance,
Poongothai
Screen Shot 2012-10-31 at 2.27.11 AM.png
[Thumbnail for Screen Shot 2012-10-31 at 2.27.11 AM.png]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off, Tomcat is running fine - it returns an error page, so it's up and running. A standard Tomcat installation is preconfigured to display something at http://localhost:8080/ - namely, the webapps/ROOT web app. There are several things to explore: has the ROOT web app been changed? Has the server.xml file been changed so that Tomcat listens on some other port than 8080?

Also, I advise not to run Tomcat inside inside an IDE; but standalone - in my experience it's easier to get started with it that way, and to track down problems like this.

You may also want to read through http://tomcat.apache.org/tomcat-7.0-doc/appdev/index.html and all the pages it links to; they explain how to get started with Tomcat.
 
Ilakya Mukunth
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i find a strange scenario.

It displays the error message shown above when i click ProjectName->Run As-> Run on Server.
But if i click on the particular JSP file and -> Run As-> Run on Server it works fine.
Really do not know how to fix it. Please help me to go forward.

Thanks for your input.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've already been given the best advice which you seem to be avoiding: don't run Tomcat in the IDE.

Running Tomcat stand-alone on a Mac is 2 steps: (1) unpack the .tar.gz file, (2) run the startup script.

Couldn't be any simpler.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My advice is this:
Ulf Dittmer wrote:Also, I advise not to run Tomcat inside inside an IDE; but standalone - in my experience it's easier to get started with it that way, and to track down problems like this.
 
Ilakya Mukunth
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. I stopped the Tomcat in Eclipse IDE.
2. StartedTomcat manually in Terminal
3. Tried launching Http://localhost:8080 from eclipse browser, it worked fine.
4. right clicked on JSP page->Run As->Run on Server-> It shows the error message that the port is already in use.
This is because I have already started tomcat from terminal and it is up and running.
5. I did run tomcat from terminal as you said, but i do not know how do i run the JSP pages in eclipse without tying to run tomcat from eclipse IDE.
my questions and doubts may sound silly, but i am new to this technology and i try to learn by myself.
if you could help me to resolve the conflict and help me to set up eclipse IDE with proper setup, it would be a great help.
Thanks for your time.
Screen Shot 2012-11-01 at 6.51.27 AM.png
[Thumbnail for Screen Shot 2012-11-01 at 6.51.27 AM.png]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but i do not know how do i run the JSP pages in eclipse without tying to run tomcat from eclipse IDE.

You wouldn't run them in the IDE - you would copy them to your Tomcat directory and run them in the standalone Tomcat.

I'm sure there's a way to tell Eclipse that you're using a standalone Tomcat instead of a built-in Tomcat, but I'm not familiar with Eclipse, so I can't help with that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic