⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addbook.jsp

📁 这是个简单的在线书店购书系统
💻 JSP
字号:
<%@ page language="java" import="java.util.*,mypack.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'add.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  
  
  

   <form action="addbook.jsp" method="post">
   图书编号id:<input type="text" name="id"><br>
   图书名称name:<input type="text" name="name"><br>
 图书标题 title:  <input type="text" name="title"><br>
   图书价格price:<input type="text" name="price"><br>
  出版日期 yr<input type="text" name="yr"><br>
   图书描述description:<textarea rows="20" cols="30" name="description"></textarea><br>
 销售情况:  saleAmount:<input type="text" name="saleAmount"><br>
   <input type="submit" value="添加">
   </form>
   
   
	<jsp:useBean id="book" class="mypack.BookBean">
  	<jsp:setProperty name="book" property="*"/>
  	</jsp:useBean>
  	<jsp:useBean id="bookdb" class="mypack.BookDB" scope="session"/>
  <%
  	if(book.getId()!=null){
  		boolean flg=bookdb.addBook(book);
  		if(flg){
  			out.println("success");
  		}else{out.println("faile");}
  	}
  	
  %>   
   
   
  <a href="all.jsp"> all infor</a>
  </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -