Connecting Tomcat server to Eclipse

后端 未结 12 1780
忘掉有多难
忘掉有多难 2021-01-04 10:04

I am trying to use Tomcat 6.0 as a web development server within SpringSource Tool Suite 2.7.1. I create a runtime, download tomcat, create a server, etc as per these instru

相关标签:
12条回答
  • 2021-01-04 10:51

    If you have unzipped downloaded Tomcat archive into Eclipse Servers folder, User Entries in classpath have relative path (e.g. /Servers/....) of bootstrap.jar and tomcat-juli.jar which path I guess is not accessible as a relative path.

    Once I removed Tomcat installation directory (with files) outside Eclipse's Servers folder, delete the old configuration and re-add Tomcat, everything worked as expected.

    I hope this helps narrow down the cause.

    0 讨论(0)
  • 2021-01-04 10:54

    I had similar issue. This is what worked for me:

    1. When the path begins with slash like: "/Servers/Tomcat/bin/bootstrap.jar" it means that the local project is refered. In the picture - I had 'pivotal-tc-server-developer-3.2.8.RELEASE' as the name of the project.

    1. Open the project ('Servers' in your case or 'pivotal-tc-server-developer-3.2.8.RELEASE') so it is accessible to Eclipse.

    2. The jar should be now visible.

    Alternatively go into Run Configurations; delete jars, and add it as an external jar.

    0 讨论(0)
  • 2021-01-04 10:55

    The trick here was that the location of the jar was inside the Eclipse/STS project directory. STS stores its server configurations inside the /Servers folder and I had decided to store the tomcat runtimes here as well for neatness. Placing the runtimes elsewhere and trying again solves this issue.

    0 讨论(0)
  • 2021-01-04 10:55

    I was also facing same issue and solved it as follows : My conclusions : 1) In my case issue was coming as I shifted the location of the Tomcat. Solution : 2) double clicked on the server configured in the eclipse. 3) Click on Open Launch configuration. 4) Change the classpath under classpath tab to the new location.

    Hope this would help.

    0 讨论(0)
  • 2021-01-04 11:05

    You can try as below steps:

    1. Open Window -> Preferences -> Server -> Runtime Environments
    2. Click add button, choose the what's kind of server you use.
    3. Click next button, give a name to your runtime server and the path of tomcat.
    4. New a new server with the new created runtime server
    0 讨论(0)
  • 2021-01-04 11:07

    I googled my way here on the search terms, "the specified tomcat directory does not exist". (I had moved it from one directory to another.)

    For others here for that reason, my solution was to go into Window -> Preferences -> Server -> Runtime Environments and update it there. Then to update the JARs, as in Marcin Wasiluk's answer.

    0 讨论(0)
提交回复
热议问题