728x90
반응형
update.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%-- /springmvc1/src/main/webapp/WEB-INF/view/item/update.jsp --%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>상품 수정</title>
</head>
<body>
<form:form modelAttribute="item" action="update" enctype="multipart/form-data" >
<form:hidden path="id" />
<form:hidden path="pictureUrl" />
<h2>상품 정보 수정</h2>
<table>
<tr>
<td>상품명</td>
<td>
<form:input path="name" maxlength="20" />
</td>
<td>
<font color="red"><form:errors path="name" /></font>
</td>
</tr>
<tr>
<td>상품가격</td>
<td>
<form:input path="price" maxlength="20" />
</td>
<td>
<font color="red"><form:errors path="price" /></font>
</td>
</tr>
<tr>
<td>상품이미지</td>
<td>
<input type="file" name="picture" />
</td>
<td>${item.pictureUrl}</td>
</tr>
<tr>
<td>상품명</td>
<td>
<form:textarea path="description" cols="20" rows="5" />
</td>
<td>
<font color="red">
<form:errors path="description" />
</font>
</td>
</tr>
<tr>
<td colspan="3">
<input type="submit" value="수정등록">
<input type="button" value="상품목록" onclick="location.href='list'">
</td>
</tr>
</table>
</form:form>
</body>
</html>
728x90
반응형
'study > Spring' 카테고리의 다른 글
[Spring] 24. Spring (장바구니[ItemSet, Cart, cart, CartController]) (0) | 2022.05.06 |
---|---|
[Spring] 24. Spring (상품삭제 [deleteForm]) (0) | 2022.05.06 |
[Spring] 24. Spring (상품등록 [edit]) (0) | 2022.05.04 |
[Spring] 24. Spring (상품 상세보기 [detail]) (0) | 2022.05.04 |
[Spring] 24. Spring (상품목록 [springmvc1/pom, web, spring-db, list, item, ItemController, ShopService, ItemDao, spring-mvc, oracle_shop]) (0) | 2022.05.03 |