intellij+springboot+jsp 조합시 404오류..

2,854 views
Skip to first unread message

무세

unread,
Dec 18, 2015, 2:46:35 AM12/18/15
to Korea Spring User Group Q&A



intellij + springboot 1.3  + jsp  로 샘플 프로젝트를 만들고 있는데...


intelliJ에서 실행을 하고 브라우저에서 url을 입력하면 아래와 같은 오류가 납니다..

There was an unexpected error (type=Not Found, status=404).

/WEB-INF/jsp/memberlist.jsp


하지만 터미널에서 mvn clean spring-boot:run을 하면..

오류가 나지 않고 memberlist.jsp 파일을 잘 호출합니다.


application.properties 파일에 이렇게 했고..

spring.mvc.view.prefix=/WEB-INF/jsp/

spring.mvc.view.suffix=.jsp


pom.xml에는..

<dependency>

   <groupId>org.apache.tomcat.embed</groupId>

   <artifactId>tomcat-embed-jasper</artifactId>

   <scope>provided</scope>

</dependency>


<!-- WEB -->

<dependency>

   <groupId>javax.servlet</groupId>

   <artifactId>jstl</artifactId>

   <!--<version>1.2</version>-->

</dependency>

추가 했습니다..


IntelliJ 버그인듯 한데..  혹시 해결방안 알고 있으신분은 공유 부탁드립니다.  

Mark Sunghun Park

unread,
Dec 19, 2015, 2:38:04 PM12/19/15
to ksug
똑같은 걸 이클립스 같은 다른 툴에서 돌려보시면  확인이 쉽지 않을까요?

--
이 메일은 Google 그룹스 'Korea Spring User Group Q&A' 그룹에 가입한 분들에게 전송되는 메시지입니다.
이 그룹에서 탈퇴하고 더 이상 이메일을 받지 않으려면 ksug+uns...@googlegroups.com에 이메일을 보내세요.
https://groups.google.com/group/ksug에서 이 그룹을 방문하세요.
웹에서 이 토론을 보려면 https://groups.google.com/d/msgid/ksug/06934fbf-8650-4701-8945-30bd74271a76%40googlegroups.com을(를) 방문하세요.
더 많은 옵션을 보려면 https://groups.google.com/d/optout을(를) 방문하세요.

Tyler Lim

unread,
Dec 20, 2015, 11:38:25 PM12/20/15
to ks...@googlegroups.com
저의 경험으로는 Eclipse의 Server Context Root와 Intellij Server Context Root 경로가 달라 Intellij 에서는 JSP를 찾지 못하는 경우가 있었습니다.(Intellij 의 구성은 프로젝트 > 모듈 단위이기 때문)

Spring boot 초기화 시 EmbeddedServletContainerCustomizer 로  Server context root 추가 설정하여 해당 문제를 해결했었으니 참고하기 바랍니다.




2015. 12. 18., 오후 4:46, 무세 <hsp...@gmail.com> 작성:

signature.asc

김지헌

unread,
Dec 20, 2015, 11:40:58 PM12/20/15
to ks...@googlegroups.com
컴퓨터를 바꿔보니 정상적으로 동작했다는 후문이 있습니다. @_@);;



2015년 12월 21일 오후 1:38, Tyler Lim <place...@gmail.com>님이 작성:
웹에서 이 토론을 보려면 https://groups.google.com/d/msgid/ksug/31E16FA3-0071-4900-8527-F8DA4FB9CB60%40gmail.com을(를) 방문하세요.

더 많은 옵션을 보려면 https://groups.google.com/d/optout을(를) 방문하세요.



--
이름 : 김지헌
별명 : 허니몬
블로그 : http://ihoney.pe.kr / http://java.ihoney.pe.kr
트위터 : @ihoneymon
이메일 : ihon...@gmail.com
Reply all
Reply to author
Forward
0 new messages