Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse and Tomcat
Eclipse and Tomcat [message #869855] Fri, 04 May 2012 14:18 Go to next message
Gabriele D\\\'Antimi is currently offline Gabriele D\\\'AntimiFriend
Messages: 4
Registered: May 2012
Junior Member
I installed tomcat on my ubuntu manually.
If I start tomcat by shell, localhost:8080 show me the administration page of tomcat but I cannot launch the project because it says that the port 8080 is busy (by tomcat itself) and the tomcat eclipse server doesn't start.

If I stop the tomcat server by shell and then I launch the project, it works, but if I go to localhost:8080 it give me a 404 error

HTTP Status 404 - /

type Status report

message /

description The requested resource (/) is not available.
Apache Tomcat/7.0.27


How can I configure tomcat to have a better behavoir?

Thanks
Re: Eclipse and Tomcat [message #869979 is a reply to message #869855] Sat, 05 May 2012 12:12 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 05/04/2012 08:18 AM, Gabriele D\'Antimi wrote:
> I installed tomcat on my ubuntu manually. If I start tomcat by shell,
> localhost:8080 show me the administration page of tomcat but I cannot
> launch the project because it says that the port 8080 is busy (by tomcat
> itself) and the tomcat eclipse server doesn't start.
>
> If I stop the tomcat server by shell and then I launch the project, it
> works, but if I go to localhost:8080 it give me a 404 error
> HTTP Status 404 - /
>
> type Status report
>
> message /
>
> description The requested resource (/) is not available.
> Apache Tomcat/7.0.27
>
> How can I configure tomcat to have a better behavoir?
>
> Thanks

First, this is a question for the Eclipse web tools forum.

There are two principal ways to debug your web application project
running on Tomcat. One is to launch Tomcat and deploy to it from
Eclipse. The other way is more "Eclipse integrated" and involves
alerting Eclipse to the existence of Tomcat, creating a "Server"
project, and running Tomcat from within Eclipse. If Tomcat is running
independently, launching your application from Eclipse in the way you
apparently have will certainly result in a collision of port numbers.

One solution is not to run Tomcat externally (unless you're running for
a separate, unrelated reason).

Another is to double-click the Tomcat in the Server view (assumes you've
integrated Tomcat into Eclipse) and use the dialog to change what port
your Eclipse-Tomcat integration runs on.

This is more or less what you've done and I've said this so that you
understand more clearly what's going on.

For the 404 error, it only means that the URI you're using isn't the one
of the deployment. This is because your service/servlet/application
isn't offering the service indicated by the URI (URL) because web.xml
doesn't match what you're doing or because you're not typing the correct
URI.

This often seems pretty tricky. When deployed within Eclipse, unless
you've changed stuff, it's going to be:

http://localhost:8080/project-name/etc.

What's in etc. depends on what's in web.xml.

If this answer doesn't put you on to something you've done wrong or
failed to do, please ask your question with more detail in the Eclipse
web tools forum.
Re: Eclipse and Tomcat [message #870216 is a reply to message #869979] Mon, 07 May 2012 10:00 Go to previous messageGo to next message
Gabriele D\\\'Antimi is currently offline Gabriele D\\\'AntimiFriend
Messages: 4
Registered: May 2012
Junior Member
Thank you for your answer.
I understood that there are 2 different instance of tomcat:
- main instance: tomcat installation
- eclipse instance: eclipse set a copy of the server

Now I need to choose if is best use the eclipse instance or main instance.

But anyway your answer made all clearer.
Re: Eclipse and Tomcat [message #890427 is a reply to message #869855] Fri, 22 June 2012 09:20 Go to previous messageGo to next message
siva prasad adugula is currently offline siva prasad adugulaFriend
Messages: 1
Registered: June 2012
Junior Member
Hi,

I too have the same problem ,but the way I got this problem is different. I have't created any project in eclipse.I just configured Tomcat7.0 in eclipse. When I started server the console shown that server started . But when I am trying to hit the server,404 error is displayed.

Thanks.
Re: Eclipse and Tomcat [message #1483591 is a reply to message #869979] Sat, 22 November 2014 19:20 Go to previous messageGo to next message
Sawsan AbdulRahman is currently offline Sawsan AbdulRahmanFriend
Messages: 2
Registered: November 2014
Junior Member
I can't get rid of the 404 error !!
The localhost:8080 works fine and shows the message :"If you're seeing this, you've successfully installed Tomcat. Congratulations!". But this only appears when I change the "Use workspace metadata" to "Use tomcat installation" in the Server configuration -> Server Locations.
However, when I try to connect to any page of my projects, I get 404 Error.

The following must be my problem's solution, but I don't know what are the steps to do and how to deploy my web application in order to fix it. Can you provide me please with more information?

"For the 404 error, it only means that the URI you're using isn't the one
of the deployment. This is because your service/servlet/application
isn't offering the service indicated by the URI (URL) because web.xml
doesn't match what you're doing or because you're not typing the correct
URI."
Re: Eclipse and Tomcat [message #1483766 is a reply to message #1483591] Sat, 22 November 2014 22:52 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 11/22/2014 12:23 PM, Sawsan AbdulRahman wrote:
> I can't get rid of the 404 error !! The localhost:8080 works fine and
> shows the message :"If you're seeing this, you've successfully installed
> Tomcat. Congratulations!". But this only appears when I change the "Use
> workspace metadata" to "Use tomcat installation" in the Server
> configuration -> Server Locations. However, when I try to connect to any
> page of my projects, I get 404 Error.
>
> The following must be my problem's solution, but I don't know what are
> the steps to do and how to deploy my web application in order to fix it.
> Can you provide me please with more information?
>
> "For the 404 error, it only means that the URI you're using isn't the one
> of the deployment. This is because your service/servlet/application
> isn't offering the service indicated by the URI (URL) because web.xml
> doesn't match what you're doing or because you're not typing the correct
> URI."
>

This would be better posted in the Eclipse Web Tools Project (WTP) forum.
Previous Topic:eclipse luna crash at start
Next Topic:Juno crashing when saving any Java-based projects
Goto Forum:
  


Current Time: Sat Sep 19 12:22:10 GMT 2020

Powered by FUDForum. Page generated in 0.03492 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top