aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Unable to run Tomcat on  mac Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Unable to run Tomcat on  mac" Watch "Unable to run Tomcat on  mac" New topic
Author

Unable to run Tomcat on mac

Ilakya Mukunth
Ranch Hand

Joined: Mar 13, 2012
Posts: 57
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


[Thumbnail for Screen Shot 2012-10-31 at 2.27.11 AM.png]

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42629
    
  65
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.


Ping & DNS - my free Android networking tools app
Ilakya Mukunth
Ranch Hand

Joined: Mar 13, 2012
Posts: 57
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

Joined: Jan 10, 2002
Posts: 61654
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42629
    
  65
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

Joined: Mar 13, 2012
Posts: 57
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]

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42629
    
  65
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to run Tomcat on mac