Shans Muga
Shans Muga

Reputation: 85

How to open my resource in that localhost:8080/test/index.html?

Tomcat started in eclipse and also I'm able to open the following URL in the browser:

http://localhost:8080/test/index.html

But, I'm not able to open my resource in that page.

Error that I am getting is:

HTTP Status 404 - /
type Status report
message http:/test/index.html
description The requested resource (/test/index) is not available.
Apache Tomcat/6.0.29

Upvotes: 0

Views: 20049

Answers (1)

Björn Steinemann
Björn Steinemann

Reputation: 23

Please, try the following steps in eclipse to deploy the project as a WAR File and not as an EAR File:

  1. In the Project Explorer right click on test (which is the name of your project, if I got it right)
  2. In the context menu choose Export->WAR file
  3. In the dialog window that pops up click the Browse... button to choose the destination folder for the deployment. This should be the web application folder of your Tomcat installation: <TOMCAT_INSTALLATION>/webapps where <TOMCAT_INSTALLATION> is the folder you have installed Tomcat in.
  4. Click Finish

Now start your Tomcat server. Assuming you have the index.html file in the WebContent folder of the test project in Eclipse, you should see the content of index.html in your browser when you open the URL.

Upvotes: 1

Related Questions