This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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. :-(
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.
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.
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.
Joined: Mar 13, 2012
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.
Joined: Mar 22, 2005
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.