Simson
Simson

Reputation: 13

Can not deploy web project to myeclipse+tomcat

I'm a new comer for java web development. I can now start my tomcat6.0 with myeclipse 10.0,and have that famous tomcat welcome page on localhost:8080.

Then I try to create an empty web project.And right click to tomcat 6.0 under the server tab, choose "Add deployment",I choose project name and other things left with default.

then run my tomcat server, visit localhost:8080/projectname/index.jsp in my browser, it reply 404 error to me,"description The requested resource is not available.".

What I've repeated done: 1.Window->reference->server->tomcat 6.x, select the folder of tomcat.make sure the jdk version.

2.file->new->web project input name and done.

3.right click tomcat 6.0 in server tab, add deployment, choose project then done.

4.start server

5.goto browser ,input localhost:8080/projectname/index.jsp, got 404 error

6.select this project, try to run as myeclipse server application, it tell me could not redeploy

There are two signs maybe help.First is, when I right click tomcat under servers tab and add deployment, there is a yellow exclamation mark before it, and "deployment status" says "Deployment is out of date due to changes in the underlying project contents. You'll need to manually 'Redeploy' the project to update the deployed archive." The second on is, I can not find any thing related to my project under webapps.Is it because I installed tomcat under C driver and myeclipse have no privilege to write things into there?

I don't know why this happen, I followed everything tutorial about this topic show me. Is there anything I missed?Please, any help will be appreciate!!

Upvotes: 1

Views: 1490

Answers (2)

Simson
Simson

Reputation: 13

Alright, problem is solved. I did several steps, and I'm not sure which one is the key move, I just have the content within index.jsp.

First I uninstalled my tomcat in C driver. Then instead of exe binary format tomcat installer, I unzip my tomcat rar package into D driver. Then change CATALINA_HOME,point it to new path I also changed my MyEclipse's default workbench. Because there's also a Eclipse in my computer, they two were share the same bench, now I seperate them. Pay attention, after change the workbench, the eclipse tomcat become enable again,which has been disabled in earlier operation, and jdk for my tomcat 6.0 has to be redeclare. Last step, I point tomcat to the new one on D driver, and deploy again, everything just rock and roll.

ENV:Win7 32bit, myeclipse 10.6, tomcat 6.0

Upvotes: 0

njjnex
njjnex

Reputation: 1555

If you create empty Dynamic Web Project from Eclipse it will produce no result as it have no code your scr and WEB-INF folders will be emplty

Did you stop tomcat wich you run manually before start it from Ecliple? By default when you start your tomcat from Eclipse you not able to see welcome Tomcat page. Please post link with your tutorial here.

Upvotes: 0

Related Questions