WEB/2020_webCamp

STS (Spring Tool Suite) : 새 프로젝트 만들기

HBean_ 2020. 8. 4. 00:55

<STS에서 JSP 프로젝트 만들기>

1. File - New - Other.. 선택

 

2. Dynamic Web Project 선택

 

 

3. 프로젝트명 적고 Finish

 

 

4. maven 프로젝트로 변환 

프로젝트명 우클릭해서 configure - convert to maven project

 

 

5. webContent 폴더에 index.jsp 파일 추가

 

6. 파일명 설정하고 (index.jsp) Finish

 

 

7. Tomcat 라이브러리 추가 : 프로젝트명 우클릭 -> properties / java build path / libraries / Add library / Server Runtime

 

Next
 Tomcat 선택하고 Finish

 

8. server 설정 : Preferences > Server > Runtime Environment > Add 

 

 

 

<Test>

 

index.jsp 파일 <body>안에 text를 적고 실행하면

결과창

 

*설치를 완료하니 maven 에러가 발생해서, 구글링해서 index.jsp 파일 밑에 이 코드를 추가해서 돌렸다가 지우니 에러가 사라졌다..

 

<dependency>

    <groupId>org.apache.maven.plugins</groupId>

    <artifactId>maven-resources-plugin</artifactId>

    <version>2.4.3</version>

</dependency>

 

참고 사이트

 

https://sbell92.tistory.com/38

 

[Maven] 이클립스 Maven 연동 시 plug in 에러 날 경우

Maven - 이클립스 Maven 연동 시 plug in 에러 날 경우 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Multiple annotations found at this line: - Execution de..

sbell92.tistory.com