1. main.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>iframe main</title> </head> <body> <form id="loginForm" target="myFrame" action="/iframe" method="get"> <input type="text" name="username" value=“username” /> <input type="text" name="password" value="password" /> <input type="submit"> </form> <iframe name="myFrame" src="/iframe"> Your browser does not support inline frames. </iframe> </body> </html> |
2. iframe.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <p th:text="${username}"></p> <p th:text="${password}"></p> </body> </html> |
3. spring controller
@GetMapping(“/index”) @GetMapping("/iframe") |
'IT칼럼 > JAVA' 카테고리의 다른 글
myBatis/iBatis 특수문자 사용하기 CDATA (0) | 2019.05.10 |
---|---|
지정된 달에서 특정요일(수, 금 ,토)에 해당하는 날짜 받아오기 (0) | 2019.04.23 |
Java - String to Integer (0) | 2019.04.19 |
SinglyLinkedList 만들기 & 처음부터 끝까지(null) data 출력하기 (0) | 2019.04.17 |
Spring Boot, PostgreSQL, JPA, Hibernate RESTful CRUD API Example (0) | 2019.04.13 |