본문 바로가기
Web

스프링프레임워크 <form:form> 태그 사용법

by _dreamgirl 2023. 10. 25.
반응형

--스프링프레임워크 <form:form> 태그 사용법

스프링프레임워크 form 태그라이브러리 사용하기 위해
taglib 설정을 해야한다.
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<form:form id="frm" name="frm" method="post" action="url">
<form:form id="frm" name="frm" method="post" commandName="vo" modelAttribute="vo">
</form:form>


<form:hidden path="" /> --> input type hidden 속성으로 태그를 생성
<form:select path="" ></form:select> --> select 태그를 생성
<form:input path="" ></form:select> --> input type text 태그를 생성

이렇게 하지 않고도 스프링기반은 Model과 View를 name으로 매핑하기 때문에
자바단에서 name으로 값을 접근할 수 있다.

참고 사이트
https://tinkerbellbass.tistory.com/43

반응형

'Web' 카테고리의 다른 글

Input type 파일 업로드  (2) 2023.12.08
request 파라미터 값 설정 및 조회  (0) 2023.11.13
Eclipse 개발환경 사용시 대처법  (0) 2023.08.14
메뉴 트리 구조 샘플  (2) 2023.08.03
Spring Interceptor 클래스 구현하기  (0) 2023.07.19

댓글