?? addproduct_jsp.java
字號:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import cn.com.shopadmin.*;
import java.util.*;
public final class addProduct_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(2);
_jspx_dependants.add("/WEB-INF/struts-html.tld");
_jspx_dependants.add("/WEB-INF/struts-bean.tld");
}
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_form_method_enctype_action;
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_file_size_property_maxlength;
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_submit_value_property;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspInit() {
_jspx_tagPool_html_form_method_enctype_action = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_jspx_tagPool_html_file_size_property_maxlength = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_jspx_tagPool_html_submit_value_property = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
}
public void _jspDestroy() {
_jspx_tagPool_html_form_method_enctype_action.release();
_jspx_tagPool_html_file_size_property_maxlength.release();
_jspx_tagPool_html_submit_value_property.release();
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write(" \r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\t\r\n");
out.write(" \r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
out.write("<link href=images/css.css rel=STYLESHEET type=text/css>\r\n");
out.write("<title>添 加 商 品</title>\r\n");
out.write("</head>\r\n");
AdminUser adminUser = (AdminUser)session.getAttribute(Constants.LOGIN_USER_KEY);
if(adminUser == null ) {
response.sendRedirect("login.jsp");
}
Product product = (Product)request.getAttribute(Constants.CUR_PRODUCT_KEY);;
List sortList = (List)request.getAttribute(Constants.SORT_LIST_KEY);
Sort sort = null;
if (product==null){
product= new Product();
}
out.write("\r\n");
out.write("\r\n");
out.write("<body>\r\n");
// html:form
org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0 = (org.apache.struts.taglib.html.FormTag) _jspx_tagPool_html_form_method_enctype_action.get(org.apache.struts.taglib.html.FormTag.class);
_jspx_th_html_form_0.setPageContext(_jspx_page_context);
_jspx_th_html_form_0.setParent(null);
_jspx_th_html_form_0.setAction("addProduct.do");
_jspx_th_html_form_0.setMethod("post");
_jspx_th_html_form_0.setEnctype("multipart/form-data");
int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag();
if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write(" \r\n");
out.write(" <table class=\"border\" cellspacing=\"0\" width=\"74%\" border=\"0\" cellpadding=\"4\" cellspacing=\"0\" > \r\n");
out.write(" <tr >\r\n");
out.write(" <td class=\"tdbg\" width=\"100%\">\r\n");
out.write("\t \r\n");
out.write(" \r\n");
out.write("<p align=\"left\">\r\n");
out.write("\t \r\n");
out.write(" \r\n");
out.write("<font color=\"#FF0000\">商品類別</font> <select name=\"sortid\" size=\"1\">\r\n");
out.write("\r\n");
out.write("\t ");
if(sortList != null ){
for(int i = 0;i < sortList.size();i++)
{
sort = (Sort)sortList.get(i);
out.write("\r\n");
out.write("\r\n");
out.write(" <option value=\"");
out.print(sort.getId());
out.write('"');
out.write(' ');
if(product.getSort()!= null &&product.getSort().getId()==sort.getId()) {out.print("selected");}
out.write('>');
out.print(sort.getName());
out.write("</option>\r\n");
out.write(" ");
}
}
out.write("\r\n");
out.write(" \r\n");
out.write("</select> \r\n");
out.write("\r\n");
out.write("\t</td>\r\n");
out.write("\t</tr>\r\n");
out.write("\t</table>\r\n");
out.write("\r\n");
out.write("<table border=\"0\" width=\"534\" cellspacing=\"1\" height=\"392\" align=\"left\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"530\" height=\"395\"> \r\n");
out.write(" \r\n");
out.write(" <table border=\"0\" width=\"100%\" cellspacing=\"1\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td colspan=\"2\"><font color=\"#FF0000\">型號名稱</font>\r\n");
out.write("\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"");
out.print(product.getId());
out.write("\">\r\n");
out.write(" <input type=\"text\" name=\"name\" value=\"");
out.print(product.getName());
out.write("\" size=\"20\" class=input>\r\n");
out.write(" <font color=\"#FF0000\"> </font> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td colspan=\"2\"><font color=\"#FF0000\">市場價</font> \r\n");
out.write(" <input type=\"text\" name=\"price\" value=\"");
out.print(product.getPrice());
out.write("\" size=\"7\" class=input>\r\n");
out.write(" 元 <font color=\"#FF0000\"> 會員價</font> \r\n");
out.write(" <input type=\"text\" name=\"saleprice\" value=\"");
out.print(product.getSaleprice());
out.write("\"size=\"7\" class=input>\r\n");
out.write(" 元 <font color=\"#FF0000\"> </font></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td height=\"5\" colspan=\"2\"> \r\n");
out.write(" <hr noshade size=\"1\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td>產品推薦描述 \r\n");
out.write(" <input type=\"text\" name=\"descript\" value=\"");
out.print(product.getDescript());
out.write("\"size=\"30\" class=input value=\"不詳\">\r\n");
out.write(" </td> \r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td height=\"5\" colspan=\"2\"> \r\n");
out.write(" <hr noshade size=\"1\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td valign=\"top\" colspan=\"2\"><font color=\"#FF0000\">詳細內容介紹</font></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td valign=\"top\" colspan=\"2\">\r\n");
out.write(" <textarea rows=\"10\" name=\"contents\" cols=\"50\" class=input>");
out.print(product.getContents());
out.write("</textarea>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write("\t\t\t <td colspan=\"2\"> <font color=\"#FF0000\">商品圖片</font> \r\n");
out.write(" ");
if (_jspx_meth_html_file_0(_jspx_th_html_form_0, _jspx_page_context))
return;
out.write("\r\n");
out.write("\t\t\t\t \r\n");
out.write("\t\t\t </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" <p>\r\n");
out.write(" ");
if (_jspx_meth_html_submit_0(_jspx_th_html_form_0, _jspx_page_context))
return;
out.write("\r\n");
out.write(" \r\n");
out.write(" </p>\r\n");
out.write(" \r\n");
out.write(" \r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
out.write("\r\n");
out.write("\t\t\r\n");
out.write(" \r\n");
out.write("\t\t");
int evalDoAfterBody = _jspx_th_html_form_0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_html_form_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;
_jspx_tagPool_html_form_method_enctype_action.reuse(_jspx_th_html_form_0);
out.write(" \r\n");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
out.write("\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
private boolean _jspx_meth_html_file_0(javax.servlet.jsp.tagext.JspTag _jspx_th_html_form_0, PageContext _jspx_page_context)
throws Throwable {
JspWriter out = _jspx_page_context.getOut();
// html:file
org.apache.struts.taglib.html.FileTag _jspx_th_html_file_0 = (org.apache.struts.taglib.html.FileTag) _jspx_tagPool_html_file_size_property_maxlength.get(org.apache.struts.taglib.html.FileTag.class);
_jspx_th_html_file_0.setPageContext(_jspx_page_context);
_jspx_th_html_file_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
_jspx_th_html_file_0.setMaxlength("60");
_jspx_th_html_file_0.setProperty("theFile");
_jspx_th_html_file_0.setSize("60");
int _jspx_eval_html_file_0 = _jspx_th_html_file_0.doStartTag();
if (_jspx_th_html_file_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return true;
_jspx_tagPool_html_file_size_property_maxlength.reuse(_jspx_th_html_file_0);
return false;
}
private boolean _jspx_meth_html_submit_0(javax.servlet.jsp.tagext.JspTag _jspx_th_html_form_0, PageContext _jspx_page_context)
throws Throwable {
JspWriter out = _jspx_page_context.getOut();
// html:submit
org.apache.struts.taglib.html.SubmitTag _jspx_th_html_submit_0 = (org.apache.struts.taglib.html.SubmitTag) _jspx_tagPool_html_submit_value_property.get(org.apache.struts.taglib.html.SubmitTag.class);
_jspx_th_html_submit_0.setPageContext(_jspx_page_context);
_jspx_th_html_submit_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
_jspx_th_html_submit_0.setValue("提交");
_jspx_th_html_submit_0.setProperty("Submit");
int _jspx_eval_html_submit_0 = _jspx_th_html_submit_0.doStartTag();
if (_jspx_th_html_submit_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return true;
_jspx_tagPool_html_submit_value_property.reuse(_jspx_th_html_submit_0);
return false;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -