How can I add my application to Tomcat in Eclipse?

前端 未结 11 1488
迷失自我
迷失自我 2020-12-24 00:32

I have a web app built with Maven. Most of the time, I built the application using Intellij IDEA, but now I want to import the application in Eclipse to see something in th

11条回答
  •  萌比男神i
    2020-12-24 01:38

    I've got Tomcat 6, Java 1.6, and was trying to get it to work in Eclipse Juno Service Release 1's "internal server" (whatever that's called.) Here's what I did that worked for me:

    (Found these instructions at http://www.mkyong.com/eclipse/eclipse-ide-tomcat-version-6-0-only-supports-j2ee-1-2-1-3-1-4-and-java-ee-5-web-modules/)

    1. I should point out that I followed ClutchDude's instructions to make my project a Dynamic Web Module facet. It didn't work on its own for me, but maybe it was part of making it work in the end.

    2. Using Eclipse (or other text editor), open the file

      .settings/org.eclipse.wst.common.project.facet.core.xml

    3. Find the line that reads

    4. 3.0 is for Tomcat 7.x (so says mkyong.) Change it to 2.5 (or 2.4).

    I restarted Eclipse and it worked for my project.

提交回复
热议问题