热门关键字:
jquery > jquery教程 > html5 > 大项目之网上书城(十二)——完成啦

大项目之网上书城(十二)——完成啦

218
作者:管理员
发布时间:2020/3/24 10:58:31
评论数:0
转载请自觉注明原文:http://www.jq-school.com/Show.aspx?id=1094

  目录

  大项目之网上书城(十二)——完成啦

  主要改动

  新增代码

  1.addCategory.jsp

  效果图

  2.bookManager.jsp

  效果图

  3.userManager.jsp

  效果图

  4.error404.jsp

  效果图

  5.error500.jsp

  效果图

  6.errorelse.jsp

  效果图

  7.web.xml

  8.addFenLeiServlet

  9.bookDao里的addFenLei

  总结

  github页面

  bookstoreZhang

  大项目之网上书城(十二)——完成啦

  主要改动

  管理员添加分类,管理图书,管理用户。以及往数据库里填了几十本书。添加了错误页面。

  新增代码

  1.addCategory.jsp

  因为之前给每个分类都建了表,而且每个表都有自己的文件夹。于是,添加分类好麻烦啊。具体见servlet

  <%@pagelanguage="java"contentType="text/html;charset=utf-8"

  pageEncoding="utf-8"%>

  <!DOCTYPEhtml>

  <html>

  <head>

  <title>空白</title>

  </head>

  <%

  if(request.getSession().getAttribute("root")==null){

  response.sendRedirect(request.getContextPath()+"/client/login.jsp");

  }else{

  %>

  <bodystyle="background-color:#bbb;width:1400px;margin:0auto">

  <!--调用头部页面-->

  <divstyle="width:100%;height:100px;float:left">

  <jsp:includepage="/admin/head.jsp"></jsp:include>

  </div>

  <!--通用内容体大小-->

  <divstyle="width:70%;height:720px;float:left;margin-left:15%;">

  <!--好看的图-->

  <divstyle="width:55%;height:100%;float:left;margin-top:10%;">

  <imgalt="书架"src="${pageContext.request.contextPath}/client/img/bookshelf.jpg"style="width:90%;">

  </div>

  <!--添加界面-->

  <divstyle="width:45%;height:80%;float:left;margin-top:12%">

  <h1style="color:#8b6914;text-align:center">添加分类</h1>

  <hrstyle="height:2px;border:none;border-top:5pxridgegreen;"/>

  <formaction="${pageContext.request.contextPath}/AddFenLei"method="post"class="form-horizontal"role="form">

  <divclass="form-group">

  <labelfor="lastname"class="col-sm-3control-labelinput-lg">分类名</label>

  <divclass="col-sm-9">

  <inputtype="text"name="fenlei_name"id="fenlei_name"class="form-controlinput-lg"

  placeholder="请输入分类名"style="float:left"/>

  </div>

  </div>

  <divclass="form-group">

  <labelfor="firstname"class="col-sm-3control-labelinput-lg">英文名</label>

  <divclass="col-sm-9">

  <inputtype="text"name="feilei_table"id="fenlei_table"

  class="form-controlinput-lg"placeholder="请输入英文名"style="float:left"/>

  </div>

  </div>

  <divclass="form-group">

  <labelfor="firstname"class="col-sm-4control-labelinput-lg"></label>

  <divclass="col-sm-5">

  <inputtype="submit"name="submit"value="添加分类"

  class="form-controlinput-lgbtnbtn-warning"style="width:100%;float:left"/>

  </div>

  </div>

  </form>

  </div>

  </div>

  <!--调用底部页面-->

  <divstyle="width:100%;height:60px;float:left">

  <jsp:includepage="/admin/foot.jsp"></jsp:include>

  </div>

  </body>

  <%}%>

  </html>





如果您觉得本文的内容对您的学习有所帮助:支付鼓励



关键字:html
友荐云推荐