소개
게시글
질문&답변
2021.12.31
@requestParam 이 값을 받아오지를 못합니다.
[자문자답] 아 원인을 찾았습니다... (수정후 loginForm.html) action ="/login" th :object =" ${loginForm} " method ="post" > th :if =" ${#fields.hasGlobalErrors()} " > class ="field-error" th :each =" err : ${#fields.globalErrors()} " th :text =" ${err} " > 전체 오류 메시지 for ="loginId" > 로그인 ID type ="text" id ="loginId" th :field =" *{loginId} " class ="form-control" th :errorclass =" field-error " > class ="field-error" th :errors =" *{loginId} " /> for ="password" > 비밀번호 type ="password" id ="password" th :field =" *{password} " class ="form-control" th :errorclass =" field-error " > class ="field-error" th :errors =" *{password} " /> class ="my-4" > class ="row" > class ="col" > class ="w-100 btn btn-primary btn-lg" type ="submit" > 로그인 class ="col" > class ="w-100 btn btn-secondary btn-lg" onclick =" location . href = 'items.html' " th :onclick =" |location.href='@{/}'| " type ="button" > 취소 제가 개인적으로 loginForm 의 action을 /login 으로 바꾸어주었었습니다. 이 부분이 문제였습니다. 다시 action="~" th:action 으로 수정해주었더니 올바르게 값을 가져오는 것을 확인할 수 있었습니다. + 혹시 저 action 의 차이점이 무엇인지 알 수 있을까요??
- 1
- 1
- 360
질문&답변
2021.10.17
new-form.jsp 요청시 jsp파일 자체가 다운로드 되어버립니다
혹시나 gradle 로 안하고 maven 으로 진행하시는 분들이 계신다면 이 블로그를 참고하시길 바라겠습니다. https://sang12.co.kr/70/SPRING-BOOT-STS-GradleMaven-%ED%99%98%EA%B2%BD%EC%97%90%EC%84%9C-JSP-%EC%97%B0%EB%8F%99
- 0
- 15
- 2.4K