문제 설명
Eclipse 및 웹 프로젝트 가져오기, 서버에서 실행 누락! (Eclipse and Web Project import, run on Server missing!)
최근에 STS 2.5.1RELEASE를 설치했고 개발 프로세스를 계속하기 위해 SVN 프로젝트를 가져오고 싶었습니다... 하지만 Tomcat v6 서버에서 실행할 수 없습니다! 이것이 내가 한 일입니다.
- SVN에서 프로젝트 가져오기(확인)
- 새 서버 추가: Tomcat v6.0(확인)
- 프로젝트 패싯을 수정하여 이제 Apache Tomcat v6.0 런타임이 선택된 동적 웹 모듈(2.5) 및 Java(1.5)를 선택했습니다.
그래서 "실행 on Server..." 및 프로젝트 리소스를 서버에 추가하면 Tomcat이 완벽하게 시작되지만 내 앱은 로드되지 않습니다!!
드물게는 이전 버전의 STS에서 Java 1.x 대신 프로젝트 패싯으로 "Java 5"... 아마도 이것이 문제 일 것입니다 ... 어떤 생각??? "Java 5" 패싯을 어떻게 추가합니까? 감사합니다!
참조 솔루션
방법 1:
Check project Properties
‑> Targeted runtimes
. Maybe an incorrect value is selected.
방법 2:
I had the same problem and the issue was in the project properties.
Make sure you are not able to see the Server properties. To make them accesible, so you can use "run as", you have to access from the Project properties (right click over the project), the Project Facets and select the Dynamic Web Module.
In my case, after adding it everything worked fine. It added to my build path (project properties/java build path/libraries) the web app libraries
(by Joaquín L. Robles、eolith、David)