📄 updateproduct.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ page import="omega.domain.Sort" %>
<%@ page import="omega.domain.Product" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'addProduct.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<html:form action="/updateProduct" enctype="multipart/form-data">
商品类别
<label>
<%List list=(List)request.getAttribute("sortlist");
Product pd=(Product)request.getAttribute("product");
%>
<html:select property="sortid" >
<%for(int i=0;i<list.size();i++){
Sort s=(Sort)list.get(i);
%>
<html:option value="<%=String.valueOf(s.getId())%>">
<%=s.getName()%>
</html:option>
<%=s.getName()%>
<%} %>
</html:select>
</label>
<html:hidden property="productid" value="<%=String.valueOf(pd.getProductid())%>" />
<p>型号名称
<label>
<html:text property="name" value="<%=pd.getName()%>" />
</label>
</p>
<p>市场价
<label>
<html:text property="price" value="<%=pd.getPrice()%>"></html:text>
</label>元
会员价
<label>
<html:text property="saleprice" value="<%=pd.getSaleprice()%>"></html:text>
</label>
元 <br></p>
<p>数量<html:text property="salecount" value="<%=pd.getSalecount()%>" /><br>
</p>
<hr color="#CCCCCC" >
<p>产品推荐描述
<label>
<html:text property="descript" value="<%=pd.getDescript()%>" />
</label>
</p>
<hr color="#CCCCCC" >
<p><br>
详细内容介绍
<br>
<html:textarea property="contents" cols="60" rows="15" value="<%=pd.getContents()%>" />
</p>
<p>
<label></label>商品图片<br>
<html:file property="image" /> <br/>
<img src="<%=pd.getImage()%>" height="150" width="200" />
</p>
<p>
<label></label>
<label>
<html:submit value="提交" />
</label>
</p>
</html:form>
<br>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -