찾다
Javajava지도 시간Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

ㅋㅋㅋ           

그룹 프로젝트 이름:

EasyBuy_flc 또는 (EasyBuy_01)

팀 데이터베이스 이름:

EasyBuy_flc

버전 관리 도구:

svn 더 이상 사용되지 않습니다

향후에는 다음을 수행할 수 있습니다. 자신의 팀 프로젝트를 git에 업로드하세요.

개발 프로세스 제어:

팀 리더: 모든 html 페이지를

jsp

접미사로 변경한 다음 데이터베이스와 데이터 테이블을 설정하세요 A

팀원 : 데이터베이스 설계 및 데이터 테이블의 중국어 필드명 작성

B 팀원 : 디자인 엔터티 클래스

프로젝트 개발 단계1.데이터베이스 디자인

easybuy_user (사용자 테이블)

Table1 EU_USER_ID char

char

ID 카드

EU_EMAIL varchar           이메일

====== ================================================== ======

easybuy_product_category (제품 카테고리 표)

Table2

EPS_ID

=================== ======= ==============easybuy_product(제품 테이블)

Table

3 EP_ID EP_DESCRIPTION 제품 설명

EP_PRICE 상품 가격

EP_STOCK C_CHILD_ID 현재 상품 카테고리

EP_FILE_NAME 상품 사진 이름

==== ================== =============================== ======

easybuy_order

(주문표)

table4

EO_ID 주문한 사용자

EO_USER_NAME

주문한 사용자(실명)

EO_USER_ADDRESS

주문 배송지

EO_CREATE_TIME

주문 형성 시간

EO_COST 주문 금액

EO_STATUS 주문 상태

EO_TYPE

주문 유형

(이 프로젝트는 활성화되지 않았습니다)

==== ===== =========================== ===================

easybuy_order_detail

(주문 세부 정보 테이블)

테이블

5 EOD_ID 주문 세부 번호

EO_ID

주문 번호

EP_ID       ~ ========== ======================================= ===

easybuy_news (뉴스테이블)

Table

6

EN_ID

EN_CONTENT 뉴스 콘텐츠

EN_CREATE_TIME 뉴스 공개 시간

============================== === ===================

easybuy_comment (댓글 양식) 표 7

EC_ID

EC_CREATE_TIME

댓글 생성 시간 ㅋㅋㅋ = ============= ========================================

2.

빌딩 프로젝트 아키텍처

2.1엔티티 레이어에서 시작

Entity레이어 코드는 다음과 같습니다

:

사용자 사용자 카테고리:

Product_category 제품 카테고리:

제품 제품 정보 표: Order 주문 표:

Order_detail 주문 세부 정보 표:

뉴스 정보 테이블:

User_address 주소 클래스:

Count 클래스:

프로젝트 작업 시작: 1:

내 로그인:

기능은 다음과 같습니다: 유효성 검사, 확인 코드, 성공적인 로그인 페이지 도약.

계층화 시작:

Tool BaseDao:

package cn.com.dao;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import javax.naming.Context;import javax.naming.InitialContext;import javax.sql.DataSource;public class BaseDAO {public static final String driver = "com.mysql.jdbc.Driver";public static final String url = "jdbc:mysql://localhost:3306/easybuy?useUnicode=true&charaterEncoding=UTF-8";public static final String username = "root";public static final String pwd = "1234";public Connection con=null;public PreparedStatement ps=null;public ResultSet rs=null;    //获取连接getConnectionpublic Connection getConnection() throws Exception {//加载驱动        Class.forName(driver);if (con == null || con.isClosed()) {
            con = DriverManager.getConnection(url, username, pwd);
        }return con;
    }//查询 executeQuerypublic ResultSet executeQuery(String sql, Object...objects) throws Exception {
        con = getConnection();
        ps = con.prepareStatement(sql);for (int i = 0; i <p></p>dao 계층: <p><img src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/001/c3679bc7f5041bed4feebf855af8f59f-7.png?x-oss-process=image/resize,p_40" class="lazy" alt=""></p><pre class="brush:php;toolbar:false">   select(String name,String pwd)  Exception;

}

dao 구현 계층:

  UserDaoImpl  BaseDAO   select(String name,String pwd) ="select count(1) from easybuy_user where loginname=? and loginname=?"=(rs!==rs.getInt("id"
services 계층:

   select(String name,String pwd)

services 구현 레이어:

public class UserServiceImpl implements IUserService{

	UserDaoImpl dao=new UserDaoImpl();
@Override
	public int select(String name, String pwd) throws Exception {
		
		return dao.select(name, pwd);
	}
@Override
 public List<User> getAllList() throws Exception {
  
  return dao.getAllList();
 }
}

정적 페이지:

                
  登录 还没有商城账号,立即注册
用户名
密    码
验证码    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요看不清 <script>$("#msg").html("");</script><script>$("#msg").html("验证码不一致");</script>
 
MD5 암호화 도구:

public class Md5Tool{           public String getMD5(String pwd){          //用于加密的字符   char md5String[] ={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};          try{//使用平台的默认字符集将此String编码为bytex序列,并将结果存储到一个新的byte数组中   byte[] btInput=pwd.getBytes();               //信息摘要是安全的单向哈希函数,它接受任意大小的数据,并输出固定长度的哈希值。   MessageDigest mdInst=MessageDigest.getInstance("MD5");              //MessageDisgest对象通过使用update方法处理数据,使用指定的byte数组更新摘要               mdInst.update(btInput);             //摘要更新之后,通过调用disgest()执行哈希计算,获得密文   byte[] md = mdInst.digest();//把密文转换成十六进制的字符串形式   int j=md.length;               char str[] = new char[j*2];               int k=0;              for(int i=0;i<j>>>4&0xf];    //5   str[k++] = md5String[byte0&0xf];    //F           }                          //返回经过加密后的字符串return new String(str);
          }catch(Exception e)               return null;
}
}
}</j>

验证码问题:

1.为什么要在网站中加入验证码?

解析:为了防止机器恶意注册1s内在我们的数据库中形成N条记录

2.验证码实现机制:

 解析:为了防止浏览器读取缓存中的验证码图片,首先在形成验证码的Servlet处理程序中设置浏览器不缓存,第二种手段就是给请求的Servlet加一个随机数,这样就保证每次都从服务器拿一张验证码图片。说白了验证码就是一个服务器端的后台类(Servlet),以流的方式回送到客户端浏览器,用img标签承载。

3.雕虫小技

解析:验证的时候先进行验证码的校验,如果发现验证码不匹配, 就不用再验证用户名和密码,这样就省去了和数据库的一次交互。

验证码工具书写:

package cn.buy.util;import java.awt.Color;import java.awt.Font;import java.awt.Graphics;import java.awt.image.BufferedImage;import java.util.Random;public class AuthCode {public static final int AUTHCODE_LENGTH = 5;        //验证码长度  public static final int SINGLECODE_WIDTH = 15;  //单个验证码宽度  public static final int SINGLECODE_HEIGHT = 30; //单个验证码高度  public static final int SINGLECODE_GAP = 4;     //单个验证码之间间隔  public static final int IMG_WIDTH = AUTHCODE_LENGTH * (SINGLECODE_WIDTH + SINGLECODE_GAP);  public static final int IMG_HEIGHT = SINGLECODE_HEIGHT;  
      public static String getAuthCode() {  
        String authCode = "";  for(int i = 0; i 

验证码的servlet书写:

public class AuthCodeServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
        doPost(request, response);
    }public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {

        String authCode = AuthCode.getAuthCode();  
        
        request.getSession().setAttribute("authCode", authCode); //将验证码保存到session中,便于以后验证  try {  //发送图片  ImageIO.write(AuthCode.getAuthImg(authCode), "JPEG", response.getOutputStream());  
        } catch (IOException e){  
            e.printStackTrace();  
        } 
    }

}

验证码的Ajax,,登录的效验,,鼠标悬停和离开:

前台页面显示js:

1.光标的显示和离开

2.验证码的显示

 

<script>$(function() {
        $("#myid").click(function() {
            $.ajax({
                url : "/EasyBuy/AuthCodeServlet",
                type : "get",
                success : function(dom) {
                    document.getElementById("authImg").src = "AuthCodeServlet";
                }
            });
        });    
    });
    $(function(){
    var erro=0;
        $(".l_user").focus(function() {
            $("#lid").html("请输入用户名");
                });
        $(".l_user").blur(function(){if($(this).val()==""){
                $("#lid").html("");
            }else if ($(this).val() != ""
                            && /^[a-zA-Z]{1}([a-zA-Z]|[0-9]){4,15}$/.test($(this).val())) {
                        $("#lid").html("");
            } else {
                $("#lid").html("请输入正确的用户名(首字母为英文,5-15位)");
            }
        });
        
        $(".l_pwd").focus(function(){
            $("#pid").html("请输入密码");
        });
        $(".l_pwd").blur(function(){if($(this).val()==""){
            erro=1;
                $("#pid").html("");
            }else if ($(this).val() != ""
                            && /^.{1,16}$/.test($(this).val())) {
                            erro=0;
                        $("#pid").html("");
            } else {
                $("#pid").html("密码格式不正确");
                erro=1;
            }
        });
    });
    
    
    function checks(myform) {if (myform.luser.value == "") {
            $("#lid").html("请输入用户名");return false;
        }else if (myform.lpwd.value =="") {
            $("#pid").html("请输入密码");return false;
        }return true;
    }
</script>

 

根据前台页面表单里action的跳转:servelet:

Md5Tool md5Tool=new Md5Tool();
IUserService service = new UserServiceImpl();if("login".equals(resquest.getParameter("title")){
    String name=request.getParameter("luser");
    String pwds=request.getParameter("lpwd");if(name==null&&pwds==null){
        response.sendRedirect("/EasyBuy/Login.jsp");
}else{
        name=new String(name.getBytes("iso-8859-1"),"utf-8");
        pwds=new String(pwds.getBytes("iso-8859-1"),"utf-8");
        String mm=(String)request.getSession().getAttribute("authCode");
        String yy=request.getParameter("yzm");  //获取验证码if(!yy.equest(mm)){
                    request.getSession().setAttribute("mm","flag");
                    response.sendRedirect("/EasyBuy/Login.jsp");
            }else{try{
                 request.getSession().setAttribute("user",service.getAllList(name));
                 pwds=md5Tool.getMD5(pwds);                 int num=service.select(name,pwds);                 if(num>0){
                        request.setAttribute("uname".service.getAllList(name).getUserName());
                        request.getRequestDispatcher("/Index.jsp").forward(request,response);
             }else{
                   response.sendRedirect("/EasyBuy/Login.jsp");
            }
          }catch(Exception e){
                   e.printStackTrace();
          }
                 }
 
      }

      }


}

 2.注册:

效果图:

输入正确后即可显示登陆

在dao层:

public interface IUserDao {//插入用户信息传递一个用户对象public int add(User users) throws Exception;

}

dao实现层:

public class UserDaoImpl extends BaseDAO implements IUserDao{

    @Overridepublic int add(User users) throws Exception {
        String sql="insert into easybuy_user values(null,?,?,?,?,?,?,?,0)";
        Object[]  obj={users.getLoginName(),users.getUserName(),users.getPassword(),users.getSex(),users.getIdentityCode(),users.getEmail(),users.getMobile()};int num = executeUpdate(sql, obj);return num;
    }
}

services层:

   add(User users) throws Exception;
}

services实现层:

public class UserServiceImpl implements IUserService{

    UserDaoImpl dao=new UserDaoImpl();
    @Overridepublic int add(User users) throws Exception {        return dao.add(users);
    }
}

在我的servlet层:

      Md5Tool md5Tool =  (.equals(request.getParameter(= = = <fileitem> items =<fileitem> iter == == (filename.equals(.println(fileItem.getString(  (filename.equals(.println(fileItem.getString(  (filename.equals(.println(fileItem.getString(  (filename.equals(= fileItem.getString( (sex.equals(  (sex.equals(  (filename.equals(  (filename.equals(  (filename.equals(  (filename.equals(== fileItem.getString( (!=  num = (num ></fileitem></fileitem>

 我的前台页面:


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
                      注册                     已有商城账号,我要登录                 
* 登录用户名  
* 密码  
* 确认密码  
* 真实姓名  
* 性别   男  
* 身份证号  
* 邮箱  
* 手机  
 * 验证码                                            Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요看不清                                                                   <script> $("#msg").html("");</script>                                                                       <script> $("#msg").html("验证码不一致");</script>                                                                                  
                                                                                                              
 
            

jq的实现:

<script>  
    $(function(){
        $("#myid").click(function(){
            $.ajax({
                url:"/EasyBuy/AuthCodeServlet",
                type:"get",
                success:function(){
                    document.getElementById("authImg").src ="AuthCodeServlet";
                }
            });
        });
        
        $(".l_user").blur(function(){
            $.ajax({
                type:"get",
                url:"<%=path%>/LoginServlet?login="+$(".l_user").val(),
                success:function(dom){if(dom){
                        $("#uid").html("用户名已被注册,请重新命名");    
                    }
                        
                }
            });
        });
    
    });       
</script>

 3.我的新闻资讯:

页面显示:

点更多的时候:

在我的dao层:

public interface INewsDAO{     //查询资讯//资讯的分页 public List<news> newsList(int pageSize, int PageIndex) throws Exception;//咨询的数量,配合分页一起 public int newscount() throws Exception;//根据我的id查资讯 public List<news> newsList(String id) throws Exception;

}</news></news>

在我的dao层的查数据:

public class NewsDAOImpl extends BaseDAO implements INewsDAO{
    @Override     public List<news> newsList(String id) throws Exception{//新闻放到集合里List<news> list = new ArrayList<news>();//把sql语句放到结果集里ResultSet rs=executeQuery("select * from easybuy_news where id=? LIMIT 0,1",id);//调用我的工具类Tool<news> tool = new Tool<news>();//将我的rs对象转成集合了list.add(tool.list(rs,News.class).get(0));//查询我的分页数据,上一页,下一页。rs=executeQuery("select * from (select * from easybuy_news order by id desc) a where id order by id desc LIMIT 0,1",id);if(rs.next()){
                  rs=executeQuery("select * from (select * from easybuy_news order by id desc) a where id order by id desc LIMIT 0,1",id);
               list.add(tool.list(rs,News.class).get(0));
            }else{
               list.add(null);
            }
             rs=executeQuery("select * from easybuy_news where id>? LIMIT 0,1",id);if(rs.next()){
            rs=executeQuery("select * from easybuy_news where id>? LIMIT 0,1",id);
            list.add(tool.list(rs,News.class).get(0));
}
            close();return list;
}

  
@Overridepublic List<news> newsList(int pageSize, int PageIndex) throws Exception{
         ResultSet rs=executeQuery(“select * from easybuy_news order by id desc LIMIT ?,?”,(PageIndex-1)*pageSize,pageSize);
         Tool<news> tool = new Tool<news>();
         List<news> list = tool.list(rs,News.class);
         close();return list;

}

@Overridepublic int newscount() throws Exception{       int count=0;
       ResultSet rs=executeQuery("select count(1) from easybuy_news");       if(rs.next()){
              count=rs.getInt(1);
}              return count;
}

}</news></news></news></news></news></news></news></news></news>

Tool工具类:

public class Tool<t> {
    @SuppressWarnings("unchecked")public  List<t> list(ResultSet rs,Class<t> cls) throws Exception{
        List<t> list=new ArrayList<t>();
        Field[] fields = cls.getDeclaredFields();if(rs!=null){while (rs.next()) {
                Object obj=cls.newInstance();for (Field field : fields) {
                    String name=field.getName();
                    Method method = cls.getDeclaredMethod("set"+name.substring(0,1).toUpperCase()+name.substring(1),field.getType());try {
                        
                        method.invoke(obj,rs.getObject(name));
                    } catch (Exception e) {continue;
                    }

                }
                list.add((T)obj);
            }
        }return list;
    }
}</t></t></t></t></t>

 

在我的services层:

public interface INewsService {//查询资讯public List<news> newsList(int pageSize, int PageIndex) throws Exception;public int newscount() throws Exception;public List<news> newsList(String id) throws Exception;
}</news></news>

services实现层:

public class NewsServiceImpl  implements INewsService{
    INewsDAO dao=new NewsDAOImpl();
    @Overridepublic List<news> newsList(int pageSize, int PageIndex) throws Exception {        return dao.newsList(pageSize,PageIndex);
    }
    @Overridepublic List<news> newsList(String id) throws Exception {return dao.newsList(id);
    }
    @Overridepublic int newscount() throws Exception {return dao.newscount();
    }

}</news></news>

我的servlet层:

public class NewsServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        doPost(request, response);
    }public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        INewsService Service=new NewsServiceImpl();
        String type=request.getParameter("type");
        String id=request.getParameter("id");
        String pageindex=request.getParameter("pageindex");
        Page<news> page=new Page<news>();try {if("top5news".equals(type)){
            request.setAttribute("News",Service.newsList(id));
            }else if("newstable".equals(type)||(pageindex!=null&&!"".equals(pageindex))){if(pageindex!=null&&!"".equals(pageindex)){
                    page.setPageIndex(Integer.parseInt(pageindex));
                }
            page.setPageCount(Service.newscount());
            page.setPageList(Service.newsList(page.getPageSize(), page.getPageIndex()));
            request.setAttribute("page",page);
            }
            request.getRequestDispatcher("MyJsp.jsp").forward(request, response);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}</news></news>

 在我的前台页面:

index.jsp

<div>
                <span><a>更多 </a></span>新闻资讯</div>
            
                                 
  • [ 特惠 ]${item.title }
  •             
                

集合NewsList在三级分类里:

//资讯集合request.setAttribute("clist", list);
            request.setAttribute("NewsList",newsService.newsList(5,1));
            request.getRequestDispatcher(url).forward(request, response);

 index.jsp:

<set> </set>
  
<div></div><p>title.jsp:</p><div class="cnblogs_code"><pre class="brush:php;toolbar:false">


<if>
<forward></forward>
</if>            
<div>
    <div>
        
        <span>
            <span>加入收藏</span>
        </span>
        <span>
            <span>送货至:</span>
            <span>
                <span>四川</span>
                <div>
                    <div></div>
                    <div>
                        <h2 id="请选择所在的收货地区">请选择所在的收货地区</h2>
                        <table>
                          <tr>
                            <th>A</th>
                            <td>
<span>安徽</span><span>澳门</span>
</td>
                          </tr>
                          <tr>
                            <th>B</th>
                            <td><span>北京</span></td>
                          </tr>
                          <tr>
                            <th>C</th>
                            <td><span>重庆</span></td>
                          </tr>
                          <tr>
                            <th>F</th>
                            <td><span>福建</span></td>
                          </tr>
                          <tr>
                            <th>G</th>
                            <td>
<span>广东</span><span>广西</span><span>贵州</span><span>甘肃</span>
</td>
                          </tr>
                          <tr>
                            <th>H</th>
                            <td>
<span>河北</span><span>河南</span><span>黑龙江</span><span>海南</span><span>湖北</span><span>湖南</span>
</td>
                          </tr>
                          <tr>
                            <th>J</th>
                            <td>
<span>江苏</span><span>吉林</span><span>江西</span>
</td>
                          </tr>
                          <tr>
                            <th>L</th>
                            <td><span>辽宁</span></td>
                          </tr>
                          <tr>
                            <th>N</th>
                            <td>
<span>内蒙古</span><span>宁夏</span>
</td>
                          </tr>
                          <tr>
                            <th>Q</th>
                            <td><span>青海</span></td>
                          </tr>
                          <tr>
                            <th>S</th>
                            <td>
<span>上海</span><span>山东</span><span>山西</span><span>四川</span><span>陕西</span>
</td>
                          </tr>
                          <tr>
                            <th>T</th>
                            <td>
<span>台湾</span><span>天津</span>
</td>
                          </tr>
                          <tr>
                            <th>X</th>
                            <td>
<span>西藏</span><span>香港</span><span>新疆</span>
</td>
                          </tr>
                          <tr>
                            <th>Y</th>
                            <td><span>云南</span></td>
                          </tr>
                          <tr>
                            <th>Z</th>
                            <td><span>浙江</span></td>
                          </tr>
                        </table>
                    </div>
                </div>
            </span>
        </span>
        
        <span>
            <span>
                <div></div>
                <if>你好,欢迎您:<a>${user.userName }</a>  
 | <a>我的订单</a> |<a>注销</a>                  
                </if>
                <if>
 你好,请<a>登录</a>  
<a>免费注册</a>
                </if>
                            </span>
            <span>
                <div>
                    <a>收藏夹</a>
                    <div>
                        <div></div>
                        <div>
                            <ul>
                                <div>暂无收藏商品!</div>                            </ul>
                        </div>
                    </div>     
                </div>
                <div>
                    <a>客户服务</a>
                    <div>
                        <div></div>
                        <div>
                            <ul>
                                <li><a>售后流程</a></li>
                                <li><a>订购方式</a></li>
                                <li><a>隐私声明</a></li>
                            </ul>
                        </div>
                    </div>    
                </div>
                <div>
                    <a>网站导航</a>
                    <div>
                        <div></div>
                        <div>
                            <ul>
                                <li><a>精品女装</a></li>
                                <li><a>生活电器</a></li>
                            </ul>
                        </div>
                    </div>    
                </div>
            </span>
            <span>| 关注我们:</span>
            <span><a>新浪</a><a>微信</a></span>
            <span>| <a>手机版 <img  src="/static/imghwm/default1.png" data-src="images/s_tel.png" class="lazy" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" ></a></span>
        </span>
    </div>
</div>
<div>
    <div><a><img  src="/static/imghwm/default1.png" data-src="images/logo.png" class="lazy" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" ></a></div>
    <div>
        <form>
            <input>
            <input>
        </form>                      
        <span>
             
                                    <a>咖啡</a>
                                                        <a>iphone 6S</a>
                                                        <a>新鲜美食</a>
                                                        <a>蛋糕</a>
                                                        <a>日用品</a>
                                                        <a>连衣裙</a>
                                                        </span>
    </div>
<div>



<if>

        <div>购物车 [ <span>${pcount}</span> ]</div>
     </if>
     <if>
        <div>购物车 [ <span>0</span> ]</div>
     </if>
        <div>
        <if>
               <!--Begin 购物车未登录 Begin-->

            <div>还未登录!<a>马上登录</a> 查看购物车!</div>
            <!--End 购物车未登录 End-->
            </if>
            <!--Begin 购物车已登录 Begin-->
            <if>
            <ul>
            <if>
            <foreach>
            
                <li>
                    <div><a><img  src="/static/imghwm/default1.png" data-src="images/${item.fileName }" class="lazy" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" ></a></div>
                    <div><a>${item.name }</a></div>
                    <div>
<font>${item.price }</font> X${item.count }</div>
                </li>
            </foreach>
         
             </if>
            </ul>
            <if>0}">
            <div>
            <div>共计  <font>¥</font><span>${pprice }</span>
</div>
            <div><a>去购物车结算</a></div>
             </div>
             </if>
              <if>
              <div>
               <div>购物车内还没有商品,赶快选购吧!</div>
              </div>       
              </if>
            </if>
        <!--End 购物车已登录 End-->
        </div>
    </div>
</div>
<!--End Header End--> 
<!--Begin Menu Begin-->


<script>function deleteCartGoods(rec_id)
{
Ajax.call(&#39;delete_cart_goods.php&#39;, &#39;id=&#39;+rec_id, deleteCartGoodsResponse, &#39;POST&#39;, &#39;JSON&#39;);
}/**
 * 接收返回的信息 */function deleteCartGoodsResponse(res)
{  if (res.error)
  {
    alert(res.err_msg);
  }  else
  {
      document.getElementById(&#39;ECS_CARTINFO&#39;).innerHTML = res.content;
  }
}</script>

    
    
                     
            
全部商品分类
            
                
                                                                      
  •                             
                                    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 ${item1.key.name }                             
                                
                                    
                                                                                 
                                                
    ${item2.key.name }
                                                
                                                    ${item3.name }                                                 |
                                            
                                        
                                    
                                    
                                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                                 
                                
                            
  •                                              
                    
            
        
                                                                         
                                                                                                                                                                                  
  •                       首页             
  •                               
  •                       箱包                 
  •                               
  •                       手机数码                 
  •                               
  •                       进口食品                 
  •                               
  •                       化妆品                 
  •                               
  •                       生活电器                 
  •                     
        
中秋送好礼!
    

在我的sevlet:

package cn.buy.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.buy.entity.Product;
import cn.buy.entity.Product_category;
import cn.buy.service.INewsService;
import cn.buy.service.IProductService;
import cn.buy.service.IProduct_categoryService;
import cn.buy.service.impl.NewsServiceImpl;
import cn.buy.service.impl.ProductServiceImpl;
import cn.buy.service.impl.Product_categoryServiceImpl;public class Product_categoryServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        doPost(request, response);
    }    public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {//三级列表IProduct_categoryService service = new Product_categoryServiceImpl();//资讯INewsService newsService=new NewsServiceImpl();//获取请求页面urlString url=(String)request.getAttribute("url");
        Map<product_category>>> map = new HashMap<product_category>>>();try {for (Product_category oneitem : service.oneList()) {
                Map<product_category>> twomap=new HashMap<product_category>>();for (Product_category twoitem : service.twoList(oneitem.getId())) {
                    List<product_category> list=new ArrayList<product_category>();for (Product_category threeitem : service.threeList(twoitem.getId())){
                        
                        list.add(threeitem);                
                    }
                    
                    twomap.put(twoitem, list);
                }
                map.put(oneitem, twomap);
            }//三级列表集合request.setAttribute("map",map);
            IProductService service1 = new ProductServiceImpl();
            List<product> list = new ArrayList<product>();
            Cookie[] cookies = request.getCookies();int j = 0;for (int i = cookies.length-1; i >= 1; i--) {if (cookies[i].getValue().equals("id")) {
                    j++;if (j </product></product></product_category></product_category></product_category></product_category></product_category></product_category>

我的三级菜单:

package cn.buy.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.swing.RepaintManager;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import cn.buy.entity.Count;
import cn.buy.entity.News;
import cn.buy.entity.Product;
import cn.buy.service.IProductService;
import cn.buy.service.impl.ProductServiceImpl;
import cn.buy.util.Page;public class ProductServlet extends HttpServlet {

    String name=null;public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {if(name==null&&request.getParameter("keywords")!=null){
            name =  new String(request.getParameter("keywords").getBytes("ISO-8859-1"),"utf-8"); 
        }
        doPost(request, response);
    }public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        response.setCharacterEncoding("utf-8");
        IProductService service = new ProductServiceImpl();
        String id=request.getParameter("id");
        String type=request.getParameter("type");
        String oneid = request.getParameter("oneid");
        String twoid = request.getParameter("twoid");
        String threeid = request.getParameter("threeid");
        String pcount = request.getParameter("pcount");
        String pageindex=request.getParameter("pageindex");
        Page<product> page=new Page<product>();if(name==null){
            name =  request.getParameter("keywords"); 
        }if ("fl".equals(type)) {try {
                page.setPageSize(4);if(pageindex!=null&&!"".equals(pageindex)){
                    page.setPageIndex(Integer.parseInt(pageindex));
                }if (oneid != null && !"".equals(oneid)) {
                    page.setPageCount(service.pcount(oneid, "one"));
                    page.setPageList(service.List(page.getPageSize(), page.getPageIndex(),oneid,"one"));
                    request.setAttribute("count",service.pcount(oneid, "one"));
                    request.setAttribute("oneid", oneid);
                } else if (twoid != null && !"".equals(twoid)) {
                    page.setPageCount(service.pcount(twoid, "two"));
                    page.setPageList(service.List(page.getPageSize(), page.getPageIndex(),twoid,"two"));
                    request.setAttribute("count",service.pcount(twoid, "two"));
                    request.setAttribute("twoid", twoid);
                } else if (threeid != null && !"".equals(threeid)) {
                    page.setPageCount(service.pcount(threeid, "three"));
                    page.setPageList(service.List(page.getPageSize(), page.getPageIndex(),threeid,"three"));
                    request.setAttribute("count",service.pcount(threeid, "three"));
                    request.setAttribute("threeid", threeid);
                }else if (name != null) {
                    page.setPageCount(service.pcount(name, "ss"));
                    page.setPageList(service.List(page.getPageSize(), page.getPageIndex(),name,"ss"));
                    request.setAttribute("count",service.pcount(name, "ss"));
                    request.setAttribute("ss",name);
                    name=null;
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
            request.setAttribute("page",page);
            request.getRequestDispatcher("BrandListjsp").forward(request,
                    response);
        }else if("gwc".equals(type)){
            List<product> plist=(List<product>)request.getSession().getAttribute("plist");if(plist==null){
                plist=new ArrayList<product>();
            }int count=0;double price=0;
            boolean flag=true;try {if(pcount==null||"".equals(pcount)){
                    pcount="1";
                }for (Product item : plist) {if(item.getId()==Integer.parseInt(id) ){
                        item.setCount(item.getCount()+Integer.parseInt(pcount));
                        flag=false;break;
                    }
                }           if(flag&&pcount!=null&&!"".equals(pcount)){
                    Product product=service.List(id);
                    product.setCount(Integer.parseInt(pcount));
                    plist.add(product);    
                }                for (Product item : plist) {
                    count+=item.getCount();
                    price+=item.getCount()*item.getPrice();
                }for (Product item : plist) {
                    item.setCount1(count);
                    item.setPrice1(price);
                }
                JSONArray jsonArray=JSONArray.fromObject( plist);
                request.getSession().setAttribute("plist",plist);
                request.getSession().setAttribute("pprice",price);
                request.getSession().setAttribute("pcount",count);
                response.getWriter().print(jsonArray);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }else if("jia".equals(type)||"jian".equals(type)){int count=0;double price=0;
            List<product> plist=(List<product>)request.getSession().getAttribute("plist");for (Product item : plist) {if(item.getId()==Integer.parseInt(id) ){if("jia".equals(type)){
                    item.setCount(item.getCount()+1);
                    }else{
                    item.setCount(item.getCount()-1);
                    }break;
                }
            }for (Product item : plist) {
                count+=item.getCount();
                price+=item.getCount()*item.getPrice();
            }for (Product item : plist) {
                item.setCount1(count);
                item.setPrice1(price);
            }
            JSONArray jsonArray=JSONArray.fromObject( plist);
            response.getWriter().print(jsonArray);
            request.getSession().setAttribute("plist",plist);
            request.getSession().setAttribute("pprice",price);
            request.getSession().setAttribute("pcount",count);
        }else if("de".equals(type)){
            response.getWriter().print(id);
        }else if("delete".equals(type)||"qk".equals(type)){int count=0;double price=0;
            List<product> plist=(List<product>)request.getSession().getAttribute("plist");if("delete".equals(type)){for (int i=0;i<plist.size></plist.size></product></product></product></product></product></product></product></product></product>

单点的一个跳转:分页中的下一篇和上一篇

<div>
         <p>[特惠]${News[0].title }</p>
<p><b>${News[0].brief }/${News[0].createTime }</b>
         </p>
</div>
         <div></div> ${News[0].content}         <div>
         
                   <object>
<param>
<param>
<param>
<embed></embed></object>                            </div>
           <div></div>
         <div>
         <if>下一篇:<a>${News[1].title }</a><br>
         </if>
         <if>          
                      上一篇:<a>${News[2].title }</a><br>  
         </if>    
                   </div>
     
   
  
  <div></div>

商品分类:

 前台:



nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">


<meta>
    <link>
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
        <script type="text/javascript">   EvPNG.fix(&#39;div, ul, img, li, input, a&#39;); </script>
    <![endif]-->
        <script></script>
    <script></script>
    <script></script>    
            
    <script></script>   
     
    
    <script></script>
    
    <link>
    <link>
    <script></script>
    
    <script>var jq = jQuery.noConflict();</script>
        
    <script></script>
    
    <script></script>
    <script>$(function(){
            $(".mya").click(function(){             <c:if test="${user==null}">  location.href="Login.jsp?tz=1";                 $.ajax({
                    url:"/EasyBuy/ProductServlet?id="+$product.id+"&type=gwc&pcount="+$("#myinput").val(),
                    type:"get",
                    dataType: "json",
                    success:function(data){var li="";var count=0;var count1=0;var price1=0;
                    $.each(data,function(i,item){
                        count++;                         if(i==0){
                         $("#div").html("<div class=&#39;price_sum&#39;>共计  <font color=&#39;#ff4e00&#39;>¥<span id=&#39;zj&#39;>${pprice }</script>
去购物车结算
");                         $("#gw").text(item.count1);                          $("#zj").text(item.price1);                          count1=item.count1;                          price1=item.price1;                          }                          li+="
  • Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
    "+item.name+"
    "+item.price+" X"+item.count+"
  •    ";                     });                     $("#gwc").html("购物车共有"+count+"种宝贝("+count1+"件)     合计:"+price1+"元");                     $("#ul").html(li);                     ShowDiv('MyDiv1','fade1');                     }                                          });               });                      });       
            
                         <div>             <div><a><img src="/static/imghwm/default1.png" data-src="images/${product.fileName }" class="lazy" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" ></a></div>             <img class="MagicZoomLoading lazy" src="/static/imghwm/default1.png" data-src="images/loading.gif" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" >                         </div>                  
                
                    

    ${product.name }

    “开业巨惠,北京专柜直供”,不光低价,“真”才靠谱!
                
    本店价格:${product.price }
    消费积分:28R             
                
                    型号选择:                 
                          
    • 30ml
    •                     
    • 50ml
    •                     
    • 100ml
    •                 
                
                
                    颜色选择:                 
                          
    • 红色
    •                     
    • 白色
    •                     
    • 黑色
    •                 
                
                
                    
    分享
                            Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                     
                    
                                 
                
                    
                                                                                      
                    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요             
                         
                          
                
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                         
                               
        
               
                             
                    
                        
                              
    • 推荐搭配
    •                     
                    
                    
                        
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                                             
                            
                            768.00   18R
                    
                    
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                    
                        
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                                             
                            
                            749.00   18R
                    
                    
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                    
                        
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                                             
                            
                            749.00   18R
                    
                    
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                    
    套餐价:¥1517
                        
                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                  
                                 
                
                    
                        
                              
    • 商品属性
    •                         
    • 商品详情
    •                         
    • 商品评论
    •                     
                    
                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
    商品名称:迪奥香水商品编号:1546211品牌: 迪奥(Dior)上架时间:2015-09-06 09:19:09 
    商品毛重:160.00g商品产地:法国香调:果香调香型:淡香水/香露EDT 
    容量:1ml-15ml 类型:女士香水,Q版香水,组合套装  
                                                                                                                                          
                  
                                
                    
    商品详情
                    
                                                                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                             迪奥真我香水(Q版)
    【商品规格】:5ml
    【商品质地】:液体
    【商品日期】:与专柜同步更新
    【商品产地】:法国
    【商品包装】:无外盒 无塑封
    【商品香调】:花束花香调
    【适用人群】:适合女性(都市白领,性感,有女人味的成熟女性)
                            
                                             

                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                     

                                         
                  
                                
                    
    商品评论
                                                                                                                                                                                
                            

    80.0%

    好评度
                                                                                                                                                                                                                                                                                                                                                                                                     
    好评(80%) Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
    中评(20%) Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
    差评(0%) Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                        
    购买过雅诗兰黛第六代特润精华露50ml的顾客,在收到商品才可以对该商品发表评论您可对已购买商品进行评价
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 向死而生颜色分类:粉色 
    型号:50ml                     
    产品很好,香味很喜欢,必须给赞。 
                            2015-09-24                     
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 就是这么想的颜色分类:粉色 
    型号:50ml                     
    送朋友,她很喜欢,大爱。 
                            2015-09-24                     
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 墨镜墨镜颜色分类:粉色 
    型号:50ml                     
    大家都说不错
                            2015-09-24                     
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 那*****洋 
    (匿名用户)
    颜色分类:粉色 
    型号:50ml                     
    下次还会来买,推荐。
                            2015-09-24                     
                                                              
                        上一页123...20下一页                 
                                   
                                      
        
                       
        
                          
                
                    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요             
                
                                                                                                                                                                                                                           
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         您已成功收藏该商品
                            查看我的关注 >>                     
     确定
                                     
            
        
                                        
        
                          
                
                    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요             
                
                                                                                                                                                                                                                           
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         宝贝已成功添加到购物车
                            购物车共有1种宝贝(3件)     合计:1120元                     
      去购物车结算继续购物
                                     
            
        
                                      
            
                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

    正品保障

    正品行货  放心购买
                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

    满38包邮

    满38包邮 免运费
                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

    天天低价

    天天低价 畅选无忧
                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

    准时送达

    收货时间由你做主
            
        
        
            
                                                                                                             
    新手上路
                
    售后流程
                
    购物流程
                
    订购方式
                
    隐私声明
                
    推荐分享说明
            
            
                
    配送与支付
                
    货到付款区域
                
    配送支付查询
                
    支付方式说明
            
            
                
    会员中心
                
    资金管理
                
    我的收藏
                
    我的订单
            
            
                
    服务保证
                
    退换货原则
                
    售后服务保证
                
    产品质量保证
            
            
                
    联系我们
                
    网站故障报告
                
    购物咨询
                
    投诉与建议
            
            
                新浪微博                         腾讯微博             

    服务热线:
                400-123-4567             

            
            
                
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요         
        
             
            
    备案/许可证编号:蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group 
                Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요         
                 
            
    <script></script>

     

    我的订单:

               <div>
                <div>管理中心</div>
                <div>
                    <div>订单中心</div>
                    <ul>
                        <li><a>我的订单</a></li>
                        <li><a>收货地址</a></li>
                    </ul>
                </div>
                <div>
                    <div>会员中心</div>
                    <ul>
                        <li><a>用户信息</a></li>
                        <li><a>我的收藏</a></li>
                        <li><a>我的留言</a></li>
                        <li><a>推广链接</a></li>
                        <li><a>我的评论</a></li>
                    </ul>
                </div>
                <div>
                    <div>账户中心</div>
                    <ul>
                        <li><a>账户安全</a></li>
                    </ul>
                </div>
            </div>

    我的订单OrderServlet类:

    package cn.buy.servlet;
    
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.List;
    
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    import cn.buy.entity.Count;
    import cn.buy.entity.Order;
    import cn.buy.entity.Product;
    import cn.buy.entity.User;
    import cn.buy.service.IOrderSerice;
    import cn.buy.service.IRessService;
    import cn.buy.service.impl.OrderServiceImpl;
    import cn.buy.service.impl.RessServiceImpl;
    import cn.buy.util.Md5Tool;public class OrderServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            doPost(request, response);
        }public void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            User user= ((User)request.getSession().getAttribute("user"));
            IRessService ress=new RessServiceImpl();
            IOrderSerice serice=new OrderServiceImpl();
            String type=request.getParameter("type");if("cx".equals(type)){try {
                    request.setAttribute("list",serice.orders(user.getId()+""));
                    request.getRequestDispatcher("/Member_Order.jsp").forward(request, response);
                } catch (Exception e) {
                    e.printStackTrace();
                }
             }else{
                Md5Tool md5Tool=new Md5Tool();
                List<product> list=(List<product>)request.getSession().getAttribute("plist");         double pprice=(Double)request.getSession().getAttribute("pprice");
             Order order=new Order();
             order.setCost(pprice);
             order.setLoginName(user.getLoginName());
             order.setUserId(user.getId());
             Date date=new Date();
             DateFormat format=new SimpleDateFormat("yyyyMMddHHmmss");
             String time=format.format(date);
             order.setSerialNumber( md5Tool.getMD5(time+user.getId()));         try {
                order.setUserAddress(ress.Ress(user.getId()+"").getAddress());int id=serice.addorder(order);for (Product item : list) {
                    serice.adddetail(id+"",item.getId()+"",item.getCount(), item.getCount()*item.getPrice());
                }
                request.getSession().setAttribute("pprice",null);
                request.getSession().setAttribute("pcount",null);
                request.getSession().setAttribute("plist",null);
                request.setAttribute("ddbh", md5Tool.getMD5(time+user.getId()));
                request.setAttribute("price",pprice);
                request.getRequestDispatcher("BuyCar_Three.jsp").forward(request, response);
            }catch (Exception e) {
                e.printStackTrace();
            }
              
            }
        }
    
    }</product></product>

     订单的主要代码:

    package cn.buy.dao.impl;
    
    import java.nio.channels.SelectableChannel;
    import java.sql.ResultSet;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;
    
    import cn.buy.dao.BaseDAO;
    import cn.buy.dao.IOrderDAO;
    import cn.buy.entity.Order;
    import cn.buy.util.Tool;public class OrderDAOImpl extends BaseDAO implements IOrderDAO{
    
        @Overridepublic int addorder(Order order) throws Exception {
            Date date=new Date();
              DateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
              String time=format.format(date);int count=executeUpdate("insert into easybuy_order values(?,?,?,?,?,?,?)",null,order.getUserId(),order.getLoginName(),order.getUserAddress(),time,order.getCost(),order.getSerialNumber());if(count>0){
                ResultSet rs=executeQuery("SELECT id FROM easybuy_order  ORDER BY id DESC LIMIT 1 ");if(rs.next()){
                    count=rs.getInt(1);
                }
            }
            close();return count;
        }
    
        @Overridepublic boolean adddetail(String oid, String pid, int quantity, double cost) throws Exception {int count=executeUpdate("insert into easybuy_order_detail values (?,?,?,?,?)",null,oid,pid,quantity,cost);
            close();return count>0? true : false;
        }
    
        @Overridepublic List<order> orders(String userid) throws Exception {
            ResultSet rs=executeQuery("select * from easybuy_order where userid=?", userid);
            List<order> list=new ArrayList<order>();if(rs!=null){while(rs.next()){
                    Order order=new Order();
                    order.setCost(rs.getDouble("Cost"));
                    order.setCreateTime(rs.getString("CreateTime"));
                    order.setId(rs.getInt("Id"));
                    order.setLoginName(rs.getString("LoginName"));
                    order.setSerialNumber(rs.getString("SerialNumber"));
                    order.setUserAddress(rs.getString("UserAddress"));
                    order.setUserId(rs.getInt("UserId"));
                    list.add(order);
                }
            }
            close();return list;
        }
    
    }</order></order></order>

     商品详情:

    我的另一个:

    我的商品详情的前台页面:

    
    
    nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    
    
    <meta>
        <link>
        <!--[if IE 6]>
        <script src="js/iepng.js" type="text/javascript"></script>
            <script type="text/javascript">   EvPNG.fix(&#39;div, ul, img, li, input, a&#39;); </script>
        <![endif]-->
            <script></script>
        <script></script>
        <script></script>    
                
        <script></script>   
         
        
        <script></script>
        
        <link>
        <link>
        <script></script>
        
        <script>var jq = jQuery.noConflict();</script>
            
        <script></script>
        
        <script></script>
        <script>$(function(){
                $(".mya").click(function(){             <c:if test="${user==null}">  location.href="Login.jsp?tz=1";                 $.ajax({
                        url:"/EasyBuy/ProductServlet?id="+$product.id+"&type=gwc&pcount="+$("#myinput").val(),
                        type:"get",
                        dataType: "json",
                        success:function(data){var li="";var count=0;var count1=0;var price1=0;
                        $.each(data,function(i,item){
                            count++;                         if(i==0){
                             $("#div").html("<div class=&#39;price_sum&#39;>共计  <font color=&#39;#ff4e00&#39;>¥<span id=&#39;zj&#39;>${pprice }</script>
    去购物车结算
    ");                         $("#gw").text(item.count1);                          $("#zj").text(item.price1);                          count1=item.count1;                          price1=item.price1;                          }                          li+="
  • Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
    "+item.name+"
    "+item.price+" X"+item.count+"
  •    ";                     });                     $("#gwc").html("购物车共有"+count+"种宝贝("+count1+"件)     合计:"+price1+"元");                     $("#ul").html(li);                     ShowDiv('MyDiv1','fade1');                     }                                          });               });                      });       
            
                         <div>             <div><a><img src="/static/imghwm/default1.png" data-src="images/${product.fileName }" class="lazy" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" ></a></div>             <img class="MagicZoomLoading lazy" src="/static/imghwm/default1.png" data-src="images/loading.gif" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" >                         </div>                  
                
                    

    ${product.name }

    “开业巨惠,北京专柜直供”,不光低价,“真”才靠谱!
                
    本店价格:${product.price }
    消费积分:28R             
                
                    型号选择:                 
                          
    • 30ml
    •                     
    • 50ml
    •                     
    • 100ml
    •                 
                
                
                    颜色选择:                 
                          
    • 红色
    •                     
    • 白色
    •                     
    • 黑色
    •                 
                
                
                    
    分享
                            Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                     
                    
                                 
                
                    
                                                                                      
                    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요             
                         
                          
                
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                         
                               
        
               
                             
                    
                        
                              
    • 推荐搭配
    •                     
                    
                    
                        
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                                             
                            
                            768.00   18R
                    
                    
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                    
                        
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                                             
                            
                            749.00   18R
                    
                    
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                    
                        
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                                             
                            
                            749.00   18R
                    
                    
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                    
    套餐价:¥1517
                        
                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                  
                                 
                
                    
                        
                              
    • 商品属性
    •                         
    • 商品详情
    •                         
    • 商品评论
    •                     
                    
                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
    商品名称:迪奥香水商品编号:1546211品牌: 迪奥(Dior)上架时间:2015-09-06 09:19:09 
    商品毛重:160.00g商品产地:法国香调:果香调香型:淡香水/香露EDT 
    容量:1ml-15ml 类型:女士香水,Q版香水,组合套装  
                                                                                                                                          
                  
                                
                    
    商品详情
                    
                                                                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                             迪奥真我香水(Q版)
    【商品规格】:5ml
    【商品质地】:液体
    【商品日期】:与专柜同步更新
    【商品产地】:法国
    【商品包装】:无外盒 无塑封
    【商品香调】:花束花香调
    【适用人群】:适合女性(都市白领,性感,有女人味的成熟女性)
                            
                                             

                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

                        Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                     

                                         
                  
                                
                    
    商品评论
                                                                                                                                                                                
                            

    80.0%

    好评度
                                                                                                                                                                                                                                                                                                                                                                                                     
    好评(80%) Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
    中评(20%) Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
    差评(0%) Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                        
    购买过雅诗兰黛第六代特润精华露50ml的顾客,在收到商品才可以对该商品发表评论您可对已购买商品进行评价
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 向死而生颜色分类:粉色 
    型号:50ml                     
    产品很好,香味很喜欢,必须给赞。 
                            2015-09-24                     
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 就是这么想的颜色分类:粉色 
    型号:50ml                     
    送朋友,她很喜欢,大爱。 
                            2015-09-24                     
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 墨镜墨镜颜色分类:粉色 
    型号:50ml                     
    大家都说不错
                            2015-09-24                     
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요 那*****洋 
    (匿名用户)
    颜色分类:粉色 
    型号:50ml                     
    下次还会来买,推荐。
                            2015-09-24                     
                                                              
                        上一页123...20下一页                 
                                   
                                      
        
                       
        
                          
                
                    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요             
                
                                                                                                                                                                                                                           
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         您已成功收藏该商品
                            查看我的关注 >>                     
     确定
                                     
            
        
                                        
        
                          
                
                    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요             
                
                                                                                                                                                                                                                           
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요                         宝贝已成功添加到购物车
                            购物车共有1种宝贝(3件)     合计:1120元                     
      去购物车结算继续购物
                                     
            
        
                                      
            
                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

    正品保障

    正品行货  放心购买
                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

    满38包邮

    满38包邮 免运费
                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

    天天低价

    天天低价 畅选无忧
                                                                                             
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요

    准时送达

    收货时间由你做主
            
        
        
            
                                                                                                             
    新手上路
                
    售后流程
                
    购物流程
                
    订购方式
                
    隐私声明
                
    推荐分享说明
            
            
                
    配送与支付
                
    货到付款区域
                
    配送支付查询
                
    支付方式说明
            
            
                
    会员中心
                
    资金管理
                
    我的收藏
                
    我的订单
            
            
                
    服务保证
                
    退换货原则
                
    售后服务保证
                
    产品质量保证
            
            
                
    联系我们
                
    网站故障报告
                
    购物咨询
                
    投诉与建议
            
            
                新浪微博                         腾讯微博             

    服务热线:
                400-123-4567             

            
            
                
    Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요
                Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요         
        
             
            
    备案/许可证编号:蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group 
                Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요         
                 
            
    <script></script>

     商品详情图片的一个放大的效果:

    前台image图片的代码:

    <div>
                <div><a><img  src="/static/imghwm/default1.png" data-src="images/${product.fileName }" class="lazy" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" ></a></div>
                <img  class="MagicZoomLoading lazy" src="/static/imghwm/default1.png" data-src="images/loading.gif" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" >                
            </div>

    引入外界的css和js:

    <link>
        <link>
         <script></script>

    MagicZoom.js代码:

    var MagicZoom_ua = 'msie';var W = navigator.userAgent.toLowerCase();if (W.indexOf("opera") != -1) {
        MagicZoom_ua = 'opera'} else if (W.indexOf("msie") != -1) {
        MagicZoom_ua = 'msie'} else if (W.indexOf("safari") != -1) {
        MagicZoom_ua = 'safari'} else if (W.indexOf("mozilla") != -1) {
        MagicZoom_ua = 'gecko'}var MagicZoom_zooms = new Array();
    function _el(id) {return document.getElementById(id)
    };
    function MagicZoom_getBounds(e) {if (e.getBoundingClientRect) {var r = e.getBoundingClientRect();var wx = 0;var wy = 0;if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
                wy = document.body.scrollTop;
                wx = document.body.scrollLeft
            } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
                wy = document.documentElement.scrollTop;
                wx = document.documentElement.scrollLeft
            }return {'left': r.left + wx,'top': r.top + wy,'right': r.right + wx,'bottom': r.bottom + wy
            }
        }
    }
    function MagicZoom_getEventBounds(e) {var x = 0;var y = 0;if (MagicZoom_ua == 'msie') {
            y = e.clientY;
            x = e.clientX;if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
                y = e.clientY + document.body.scrollTop;
                x = e.clientX + document.body.scrollLeft
            } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
                y = e.clientY + document.documentElement.scrollTop;
                x = e.clientX + document.documentElement.scrollLeft
            }
        } else {
            y = e.clientY;
            x = e.clientX;
            y += window.pageYOffset;
            x += window.pageXOffset
        }return {'x': x,'y': y
        }
    }
    function MagicView_ia() {return false};var MagicZoom_extendElement = function() {var args = arguments;if (!args[1]) args = [this, args[0]];for (var property in args[1]) args[0][property] = args[1][property];return args[0]
    };
    function MagicZoom_addEventListener(obj, event, listener) {if (MagicZoom_ua == 'gecko' || MagicZoom_ua == 'opera' || MagicZoom_ua == 'safari') {try {
                obj.addEventListener(event, listener, false)
            } catch(e) {
                alert("MagicZoom error: " + e + ", event=" + event)
            }
        } else if (MagicZoom_ua == 'msie') {
            obj.attachEvent("on" + event, listener)
        }
    };
    function MagicZoom_removeEventListener(obj, event, listener) {if (MagicZoom_ua == 'gecko' || MagicZoom_ua == 'opera' || MagicZoom_ua == 'safari') {
            obj.removeEventListener(event, listener, false)
        } else if (MagicZoom_ua == 'msie') {
            obj.detachEvent("on" + event, listener)
        }
    };
    function MagicZoom_concat() {var result = [];for (var i = 0; i <img  src="/static/imghwm/default1.png" data-src="' + this.settings[" class="lazy" alt="Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요" >';this.smallImageCont.appendChild(this.loadingCont)
        }this.baseuri = '';this.safariOnLoadStarted = false;
        MagicZoom_zooms.push(this);this.checkcoords_ref = MagicZoom_createMethodReference(this, "checkcoords")
    };
    MagicZoom.prototype.stopZoom = function() {
        MagicZoom_removeEventListener(window.document, "mousemove", this.checkcoords_ref);if (this.settings["position"] == "custom") {
            _el(this.smallImageCont.id + "-big").removeChild(this.bigImageCont)
        }
    };
    MagicZoom.prototype.checkcoords = function(e) {var y = 0;var x = 0;
        r = MagicZoom_getEventBounds(e);
        x = r['x'];
        y = r['y'];var smallY = 0;var smallX = 0;var tag = this.smallImage;while (tag && tag.tagName != "body" && tag.tagName != "HTML") {
            smallY += tag.offsetTop;
            smallX += tag.offsetLeft;
            tag = tag.offsetParent
        }if (MagicZoom_ua == 'msie') {
            r = MagicZoom_getBounds(this.smallImage);
            smallX = r['left'];
            smallY = r['top']
        }if (x > parseInt(smallX + this.smallImageSizeX)) {this.hiderect();return false}if (x  parseInt(smallY + this.smallImageSizeY)) {this.hiderect();return false}if (y = this.smallImageSizeX) {this.positionX = this.smallImageSizeX - this.popupSizeX / 2}if ((this.positionY + this.popupSizeY / 2) >= this.smallImageSizeY) {this.positionY = this.smallImageSizeY - this.popupSizeY / 2}if ((this.positionX - this.popupSizeX / 2)  this.smallImageSizeX) {this.popupSizeX = this.smallImageSizeX
        }if (this.popupSizeY > this.smallImageSizeY) {this.popupSizeY = this.smallImageSizeY
        }this.pup.style.width = this.popupSizeX + 'px';this.pup.style.height = this.popupSizeY + 'px'};
    MagicZoom.prototype.initPopup = function() {this.pup = document.createElement("DIV");this.pup.className = 'MagicZoomPup';this.pup.style.zIndex = 10;this.pup.style.visibility = 'hidden';this.pup.style.position = 'absolute';this.pup.style["opacity"] = parseFloat(this.settings['opacity'] / 100.0);this.pup.style["-moz-opacity"] = parseFloat(this.settings['opacity'] / 100.0);this.pup.style["-html-opacity"] = parseFloat(this.settings['opacity'] / 100.0);this.pup.style["filter"] = "alpha(Opacity=" + this.settings['opacity'] + ")";this.recalculatePopupDimensions();this.smallImageCont.appendChild(this.pup);this.smallImageCont.unselectable = "on";this.smallImageCont.style.MozUserSelect = "none";this.smallImageCont.onselectstart = MagicView_ia;this.smallImageCont.oncontextmenu = MagicView_ia
    };
    MagicZoom.prototype.initBigContainer = function() {var bigimgsrc = this.bigImage.src;while (this.bigImageCont.firstChild) {this.bigImageCont.removeChild(this.bigImageCont.firstChild)
        }if (MagicZoom_ua == 'msie') {var f = document.createElement("IFRAME");
            f.style.left = '0px';
            f.style.top = '0px';
            f.style.position = 'absolute';
            f.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
            f.style.width = this.bigImageCont.style.width;
            f.style.height = this.bigImageCont.style.height;
            f.frameBorder = 0;this.bigImageCont.appendChild(f)
        }var ar1 = document.createElement("DIV");
        ar1.style.overflow = "hidden";this.bigImageCont.appendChild(ar1);this.bigImage = document.createElement("IMG");this.bigImage.src = bigimgsrc;this.bigImage.style.position = 'relative';
        ar1.appendChild(this.bigImage)
    };
    MagicZoom.prototype.initZoom = function() {if (this.loadingCont != null && !this.bigImage.complete && this.smallImage.width != 0 && this.smallImage.height != 0) {this.loadingCont.style.left = (parseInt(this.smallImage.width) / 2 - parseInt(this.loadingCont.offsetWidth) / 2) + 'px';this.loadingCont.style.top = (parseInt(this.smallImage.height) / 2 - parseInt(this.loadingCont.offsetHeight) / 2) + 'px';this.loadingCont.style.visibility = 'visible'}if (MagicZoom_ua == 'safari') {if (!this.safariOnLoadStarted) {
                MagicZoom_addEventListener(this.bigImage, "load", MagicZoom_createMethodReference(this, "initZoom"));this.safariOnLoadStarted = true;return}
        } else {if (!this.bigImage.complete || !this.smallImage.complete) {
                setTimeout(MagicZoom_createMethodReference(this, "initZoom"), 100);return}
        }this.bigImageSizeX = this.bigImage.width;this.bigImageSizeY = this.bigImage.height;this.smallImageSizeX = this.smallImage.width;this.smallImageSizeY = this.smallImage.height;if (this.bigImageSizeX == 0 || this.bigImageSizeY == 0 || this.smallImageSizeX == 0 || this.smallImageSizeY == 0) {
            setTimeout(MagicZoom_createMethodReference(this, "initZoom"), 100);return}if (this.loadingCont != null) this.loadingCont.style.visibility = 'hidden';this.smallImageCont.style.width = this.smallImage.width + 'px';this.bigImageCont.style.left = this.smallImage.width + 15 + 'px';this.bigImageCont.style.top = '0px';switch (this.settings['position']) {case 'left':this.bigImageCont.style.left = '-' + (15 + parseInt(this.bigImageCont.style.width)) + 'px';break;case 'bottom':this.bigImageCont.style.top = this.smallImage.height + 15 + 'px';this.bigImageCont.style.left = '0px';break;case 'top':this.bigImageCont.style.top = '-' + (15 + parseInt(this.bigImageCont.style.height)) + 'px';this.bigImageCont.style.left = '0px';break;case 'custom':this.bigImageCont.style.left = '0px';this.bigImageCont.style.top = '0px';break;case 'inner':this.bigImageCont.style.left = '0px';this.bigImageCont.style.top = '0px';break}this.bigImageContStyleLeft = this.bigImageCont.style.left;if (this.pup) {this.recalculatePopupDimensions();return}this.initBigContainer();this.initPopup();
        MagicZoom_addEventListener(window.document, "mousemove", this.checkcoords_ref);
        MagicZoom_addEventListener(this.smallImageCont, "mousemove", MagicZoom_createMethodReference(this, "mousemove"));if (this.settings && this.settings["drag_mode"] == true) {
            MagicZoom_addEventListener(this.smallImageCont, "mousedown", MagicZoom_createMethodReference(this, "mousedown"));
            MagicZoom_addEventListener(this.smallImageCont, "mouseup", MagicZoom_createMethodReference(this, "mouseup"));this.positionX = this.smallImageSizeX / 2;this.positionY = this.smallImageSizeY / 2;this.showrect()
        }
    };
    MagicZoom.prototype.replaceZoom = function(e, ael) {if (ael.href == this.bigImage.src) return;var newBigImage = document.createElement("IMG");
        newBigImage.id = this.bigImage.id;
        newBigImage.src = ael.getElementsByTagName("img")[0].getAttribute("tsImgS");var p = this.bigImage.parentNode;
        p.replaceChild(newBigImage, this.bigImage);this.bigImage = newBigImage;this.bigImage.style.position = 'relative';this.smallImage.src = ael.getElementsByTagName("img")[0].src;this.safariOnLoadStarted = false;this.initZoom()
    };
    function MagicZoom_findSelectors(id, zoom) {var aels = window.document.getElementsByTagName("li");for (var i = 0; i 

    ShopShow.css和MagicZoom.css:

    /* Copyright 2008 MagicToolBox.com. To use this code on your own site, visit  *//* CSS class for zoomed area */.MagicZoomBigImageCont {
        border:1px solid #91b817;
        background:#FFF;
    }
    
    .MagicZoomMain {
        text-align: center !important;
        width: 92px;
    }
    
    .MagicZoomMain div {
        padding: 0px !important;
    }/* Header look and feel CSS class *//* header is shown if "title" attribute is present in the <a> tag */.MagicZoomHeader {
        font:            10px Tahoma, Verdana, Arial, sans-serif;
        color:            #fff;
        background:        #91b817;
        text-align:     center !important; 
    }/* CSS class for small looking glass square under mouse */.MagicZoomPup {
        border:         0px solid #aaa;
        background:     #ffffff;
    }/* CSS style for loading animation box */.MagicZoomLoading {
        text-align:        center;
        background:     #ffffff;
        color:            #444;
        border:         1px solid #ccc;
        opacity:        0.8;
        padding:        3px 3px 3px 3px !important;
        display:         none; /* do not edit this line please */}/* CSS style for gif image in the loading animation box */.MagicZoomLoading img {
        padding-top:    3px !important;
    }</a>
    @charset "utf-8";
    html,body,ul,li,p{margin:0px;padding:0px;}
    li{list-style:none;}/* tsShopContainer Download by */#tsShopContainer li,#tsShopContainer img{vertical-align:top;}
    #tsShopContainer{width:392px; height:495px; float:left; position:relative; }
    #tsShopContainer #tsImgS{text-align:center;width:100%;position:relative; border:1px solid #eaeaea; }
    #tsShopContainer #tsImgS a{display:block;text-align:center;margin:0px auto;}
    #tsShopContainer #tsImgS img{border:0px; width:390px; height:390px;}
    #tsShopContainer #tsPicContainer{width:100%;height:90px;position:relative;background:url(../images/scrollPicbg.gif) repeat-x 0px 0px; margin-top:10px; }
    #tsShopContainer #tsPicContainer #tsImgSArrL{width:15px;height:100%; background:url(../images/r_left.png) no-repeat left center; position:absolute;top:0px;left:0px;cursor:pointer;}
    #tsShopContainer #tsPicContainer #tsImgSArrR{width:15px;height:100%; background:url(../images/r_right.png) no-repeat right center; position:absolute;top:0px;right:0px;cursor:pointer;}
    #tsShopContainer #tsPicContainer #tsImgSCon{position:absolute;top:0px;left:18px;width:1px;height:90px;overflow:hidden; }
    #tsShopContainer #tsPicContainer #tsImgSCon ul{width:100%;overflow:hidden;}
    #tsShopContainer #tsPicContainer #tsImgSCon li{width:90px; float:left;cursor:pointer;}
    #tsShopContainer #tsPicContainer #tsImgSCon li img{padding:2px;margin:1px;border:1px solid  #eaeaea; display:block;width:79px;height:79px;}
    #tsShopContainer #tsPicContainer #tsImgSCon li.tsSelectImg img{border:3px solid #ff4e00; padding:1px; margin:0px;}

     我的重难点:

    难点1: 在浏览中cookie的存取。 问题描述: 当用户浏览商品时将该用或浏览的当前商品id放入cookie中在”最近浏览“中显示用户浏览过的商品信息 难点:cookie中存放有SessionId如何区分SessionId和商品id? 解决方案: 在将商品id放入cookie中是将cookie的key值和value值设置为相同的值也就是商品的id(cookie中存放Sessionid的cookie的key值和value值不一样),然后在遍历cookie时对比其key值和value值是否相等(相等即商品id不相等则不是商品)

    难点2: 百度富文本编辑器中图片上传的配置 问题描述: 使用百度的文本富文本编辑器是传图片后不能在页面上显示 解决方案: 在ueditor的jsp文件夹下的config.json文件中配置正确的上传路径和访问访问路径。 imagePathFormat:图片上传后保存的路径相对于网站的根目录 imageUrlPrefix:图片的访问路径前缀相对于当前页面路径,其访问路径为imagerurlPrefix+imagePathFormat

    难点3: 商品分类信息的层级显示: 问题描述: 商品分类中存在父级分类和子分类。如何显示 解决方案: 分别查询出父级分类和子级分类类在遍历父级分类时遍历子级分类找出该父级分类的子分类进行显示 复制代码如下:

    商品分类

           
               
                //遍历父级分类            
    ${pitem.EPC_NAME }
    //显示父分类             //遍历子级分类                                    
    ${citem.EPC_NAME }
               
               
            
                                               
           

    难点4:

    使用过滤器实现权限控制 问题描述: 如何区分哪些页面需要验证权限 解决方案: 将需要验证权限的页面设置统一格式的路径在Filter中使用正则表达式筛选出取药进行权限验证的页面进行权限验证,

     

    自在人与人

     

    위 내용은 Yimai.com 프로젝트의 예제 튜토리얼을 공유하세요의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

    성명
    본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
    JVM은 운영 체제 API의 차이를 어떻게 처리합니까?JVM은 운영 체제 API의 차이를 어떻게 처리합니까?Apr 27, 2025 am 12:18 AM

    JVM은 JNI (JavanativeInterface) 및 Java 표준 라이브러리를 통한 운영 체제 API 차이를 처리합니다. 1. JNI는 Java 코드가 로컬 코드를 호출하고 운영 체제 API와 직접 상호 작용할 수 있습니다. 2. Java Standard Library는 통합 API를 제공하며,이 API는 내부적으로 다른 운영 체제 API에 매핑되어 코드가 플랫폼에서 실행되도록합니다.

    Java 9에 도입 된 모듈성은 플랫폼 독립성에 어떤 영향을 미칩니 까?Java 9에 도입 된 모듈성은 플랫폼 독립성에 어떤 영향을 미칩니 까?Apr 27, 2025 am 12:15 AM

    modularityDoesNotDirectHeftJava'splatformincendence.java'splatformincendenceIngeasted whejvm, butModularItyInfluencesApplicationStructureAndmanagement, deploymentandDuffictionBecomeMoreferficaliticiboliticalWI

    바이트 코드 란 무엇이며 Java의 플랫폼 독립성과 어떤 관련이 있습니까?바이트 코드 란 무엇이며 Java의 플랫폼 독립성과 어떤 관련이 있습니까?Apr 27, 2025 am 12:06 AM

    bytecodeinjavaistheintermediaterepresentation attenablesplatformincendence.1) javacodeiscompiledintobytecodestoredin.2) thejvminterpretsorcompilesthisbytecodeintomachinecodeartruntime, theCodeTorUnanynanynovice를 허용합니다

    Java가 플랫폼 독립 언어로 간주되는 이유는 무엇입니까?Java가 플랫폼 독립 언어로 간주되는 이유는 무엇입니까?Apr 27, 2025 am 12:03 AM

    javaachievesplatformincendenceThoughthegroughthejavavirtualMachine (JVM), theexecutesByTecodeonAnyDeviceWitHajvm.1) javacodeiscompiledintobytecode.2) thejvm-mmectretsandexecutesThisteCodeIntomachineCificinStructions, 허용

    그래픽 사용자 인터페이스 (GUI)는 Java의 플랫폼 독립성에 대한 과제를 어떻게 제시 할 수 있습니까?그래픽 사용자 인터페이스 (GUI)는 Java의 플랫폼 독립성에 대한 과제를 어떻게 제시 할 수 있습니까?Apr 27, 2025 am 12:02 AM

    Javagui 개발의 플랫폼 독립성은 과제에 직면하지만 Swing, Javafx, Unifying Locance, Performance Optimization, 타사 라이브러리 및 크로스 플랫폼 테스트를 사용하여 처리 할 수 ​​있습니다. Javagui Development는 교차 플랫폼 일관성을 제공하는 것을 목표로하는 AWT 및 Swing에 의존하지만 실제 효과는 운영 체제마다 다릅니다. 솔루션은 다음과 같습니다. 1) Swing 및 Javafx 사용 GUI 툴킷으로 사용; 2) UIMANAGER.SETLOOKANDFEEL ()을 통해 외관을 통합합니다. 3) 다른 플랫폼에 맞게 성능을 최적화합니다. 4) apachepivot 또는 SWT와 같은 타사 라이브러리 사용; 5) 일관성을 보장하기 위해 크로스 플랫폼 테스트를 수행하십시오.

    Java 개발의 어떤 측면이 플랫폼 의존적입니까?Java 개발의 어떤 측면이 플랫폼 의존적입니까?Apr 26, 2025 am 12:19 AM

    javadevelopmentisnotentirelyplatform-IndectionentDuetoSeveralFactors.1) JVMVARIATIONSAFFERFFERFORMANDBEHAVIORACROSSDIFFERENTOS.2) nativelibrariesViajniintrictionPlatform-specificiss.3) filepathsandsystempropertiesdifferbetweenplatectry. 4)

    다른 플랫폼에서 Java 코드를 실행할 때 성능 차이가 있습니까? 왜?다른 플랫폼에서 Java 코드를 실행할 때 성능 차이가 있습니까? 왜?Apr 26, 2025 am 12:15 AM

    Java 코드는 다른 플랫폼에서 실행할 때 성능 차이가 있습니다. 1) JVM의 구현 및 최적화 전략은 OracleJDK 및 OpenJDK와 같이 다릅니다. 2) 메모리 관리 및 스레드 스케줄링과 같은 운영 체제의 특성도 성능에 영향을 미칩니다. 3) 적절한 JVM을 선택하여 JVM 매개 변수 및 코드 최적화를 조정하여 성능을 향상시킬 수 있습니다.

    Java의 플랫폼 독립성의 몇 가지 한계는 무엇입니까?Java의 플랫폼 독립성의 몇 가지 한계는 무엇입니까?Apr 26, 2025 am 12:10 AM

    Java'SplatformIndenceHASLIMITATIONSINTERFORMANTOWORHEAD, 버전 컴포팅 가능성, 도전 과제, 플랫폼-특이 적 식품, 및 JVMINSTALLATION/MAYMENDENT.ThesefacteThe "WriteOnce, Runanywhere"

    See all articles

    핫 AI 도구

    Undresser.AI Undress

    Undresser.AI Undress

    사실적인 누드 사진을 만들기 위한 AI 기반 앱

    AI Clothes Remover

    AI Clothes Remover

    사진에서 옷을 제거하는 온라인 AI 도구입니다.

    Undress AI Tool

    Undress AI Tool

    무료로 이미지를 벗다

    Clothoff.io

    Clothoff.io

    AI 옷 제거제

    Video Face Swap

    Video Face Swap

    완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

    뜨거운 도구

    Atom Editor Mac 버전 다운로드

    Atom Editor Mac 버전 다운로드

    가장 인기 있는 오픈 소스 편집기

    드림위버 CS6

    드림위버 CS6

    시각적 웹 개발 도구

    에디트플러스 중국어 크랙 버전

    에디트플러스 중국어 크랙 버전

    작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

    Dreamweaver Mac版

    Dreamweaver Mac版

    시각적 웹 개발 도구

    SublimeText3 영어 버전

    SublimeText3 영어 버전

    권장 사항: Win 버전, 코드 프롬프트 지원!