728x90
반응형
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="${path}/member/picturePro" method="post" enctype="multipart/form-data">
<input type="file" name="picture">
<input type="submit" value="사진등록">
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<script>
const img = opener.document.querySelector("#pic")
img.src="${path}/picture/${filename}"
opener.document.f.picture.value="${filename}"
self.close();
</script>
728x90
반응형
'study > MVC' 카테고리의 다른 글
[MVC] 18. MVC Model2방식 - 회원가입 (비밀번호찾기) (0) | 2022.04.18 |
---|---|
[MVC] 18. MVC Model2방식 - 회원가입 (아이디찾기) (0) | 2022.04.18 |
[MVC] 18. MVC Model2방식 - 회원가입 (회원목록) (0) | 2022.04.15 |
[MVC] 18. MVC Model2방식 - 회원가입 (회원탈퇴) (0) | 2022.04.15 |
[MVC] 18. MVC Model2방식 - 회원가입 (index) (0) | 2022.04.15 |