user2549885
user2549885

Reputation:

I can access 127.0.0.1, but not http://localhost:8080

I have a problem. I am trying to run a simple JSP page from Eclipse: http://postimg.org/image/z268cl1s3/

But when I run this page i get a 404 error: http://postimg.org/image/h0rosix4z/

When I put in: localhost 127.0.0.1

in the browser it works fine: http://postimg.org/image/8js6hlsg3/

I can see eclipse is running it from localhost:8080, but when i type that in at the browser it gives me this error: http://postimg.org/image/7lbtfbf43/

Does anyone know how I can activate localhost on my mac. I looked up several tutorials, but i didnt find the answer. MySQL is also running fine on the computer, so I guess there is something that dont let me access [http://localhost:8080?]

Hope someone can help me? Best Regards Mads

Upvotes: 0

Views: 2367

Answers (2)

Zoltán Ujhelyi
Zoltán Ujhelyi

Reputation: 13858

There are two issues you are having:

  1. There is a difference between http://localhost/ (and its equivalent http://127.0.0.1) and http://localhost:8080 - the first uses port 80, the second 8080. The Tomcat server listens only to the latter, that is shown by the servers error messages, and not generic 404 messages. In other words, do not forget to add the 8080 port numbers to the end of the localhost url
  2. The Tomcat error messages show that the resources are not available, so I would look at what Java web applications are installed - e.g. the root web application is missing (the localhost:8080 url) for sure, and I am not sure whether your MySQL connector is.

Upvotes: 3

Evert Coetzee
Evert Coetzee

Reputation: 31

Search google for how adding an entry to the hosts file on your mac.

You'll basically link localhost to 127.0.0.1 there

Upvotes: 0

Related Questions