jsp+javaBean+servlet+mysqlWord格式文档下载.docx
- 文档编号:7640220
- 上传时间:2023-05-08
- 格式:DOCX
- 页数:37
- 大小:156.42KB
jsp+javaBean+servlet+mysqlWord格式文档下载.docx
《jsp+javaBean+servlet+mysqlWord格式文档下载.docx》由会员分享,可在线阅读,更多相关《jsp+javaBean+servlet+mysqlWord格式文档下载.docx(37页珍藏版)》请在冰点文库上搜索。
!
DOCTYPEHTMLPUBLIC"
-//W3C//DTDHTML4.01Transitional//EN"
>
html>
head>
basehref="
%=basePath%>
title>
MyJSP'
index.jsp'
startingpage<
/title>
<
metahttp-equiv="
pragma"
content="
no-cache"
cache-control"
expires"
0"
keywords"
keyword1,keyword2,keyword3"
description"
Thisismypage"
styletype="
text/css"
.table1{
margin:
0auto;
border-collapse:
collapse;
}
.table1td{
padding:
0px;
height:
25px;
border:
1pxsolid#6AB6B6;
text-align:
center;
font-family:
微软雅黑"
font-size:
12px;
background-color:
#EAFEFE;
.table1td.title{
28px;
color:
#fff;
#6AB6B6;
font-weight:
bold;
20px;
center;
.table1tr.colname{
14px;
bold;
}
*.nobd_tabletd{
none;
/style>
/head>
body>
divalign="
center"
style="
padding-top:
30px;
id="
add"
<
formaction="
LoginAction"
method="
post"
<
tableclass="
table1"
width="
50%"
<
tr>
tdclass="
title"
colspan="
2"
欢迎你的登录!
/td>
/tr>
<
td>
帐号<
inputtype="
text"
name="
name"
密码<
password"
tdcolspan="
submit"
value="
登录"
reset"
重置"
/table>
/form>
/div>
/body>
/html>
list.jsp
%@taglibprefix="
c"
uri="
%@pageimport="
exercise.yu.bean.UserBean"
list.jsp'
style>
}
scripttype="
text/javascript"
functionviewlist(){
document.getElementById('
d1'
).style.display='
'
d2'
none'
functionaddview(){
/script>
bodyonload="
viewlist()"
divid="
d1"
align="
tablewidth="
70%"
class="
8"
user表列表信息&
nbsp;
&
button"
增加"
onclick="
addview()"
序号<
院系<
专业<
年龄<
性别<
QQ<
电话<
操作<
c:
forEachvar="
bean"
items="
${ulist}"
${bean.id}<
${bean.yx}<
${bean.zy}<
${bean.age}<
${bean.sex}<
${bean.dh}<
${bean.qq}<
ahref="
selectOneUser?
id=${bean.id}"
修改<
/a>
deleteOneUser?
删除<
/c:
forEach>
d2"
insertUserServlet"
user信息填写<
yx"
id="
zy"
age"
radio"
sex"
男"
checked="
checked"
男<
女"
女<
dh"
qq"
提交"
返回"
update.jsp
exercise.yu.bean.*"
update.jsp'
.table1{
updateUserServlet"
${userBean.yx}"
hidden"
id"
${userBean.id}"
${userBean.zy}"
${userBean.age}"
${userBean.dh}"
${userBean.qq}"
setvalue="
var="
sexs"
set>
iftest="
${userBean.sexeqsexs}"
if>
${userBean.sexnesexs}"
Javascript:
window.history.go(-1);
<
javaBean:
packageexercise.yu.bean;
/**
*@ClassName:
UserBean
*@Description:
TODO(使用者属性的bean)
*@author******
*@date:
2014-6-11下午7:
43:
20
*/
publicclassUserBean{
privateintid;
privateStringyx;
//院系
privateStringzy;
//专业
privateStringsex;
//性别
privateStringdh;
//电话
privateStringqq;
//扣扣
privateintage;
//年龄
publicUserBean(){
publicStringgetYx(){
returnyx;
publicvoidsetYx(Stringyx){
this.yx=yx;
publicStringgetZy(){
returnzy;
publicvoidsetZy(Stringzy){
this.zy=zy;
publicStringgetSex(){
returnsex;
publicvoidsetSex(Stringsex){
this.sex=sex;
publicStringgetDh(){
returndh;
publicvoidsetDh(Stringdh){
this.dh=dh;
publicStringgetQq(){
returnqq;
publicvoidsetQq(Stringqq){
this.qq=qq;
publicintgetAge(){
returnage;
publicvoidsetAge(intage){
this.age=age;
publicintgetId(){
returnid;
publicvoidsetId(intid){
this.id=id;
Servlet:
packageexercise.yu.servlet;
importjava.io.IOException;
importjavax.servlet.ServletException;
importjavax.servlet.http.HttpServlet;
importjavax.servlet.http.HttpServletRequest;
importjavax.servlet.http.HttpServletResponse;
importexercise.yu.bean.UserBean;
importexercise.yu.dao.UserDao;
InsertOrUpdateServlet
TODO()
2014-6-12下午8:
34:
23
publicclassInsertOrUpdateServletextendsHttpServlet{
privatestaticfinallongserialVersionUID=1L;
privateUserDaouserDao;
publicvoiddoGet(HttpServletRequestrequest,HttpServletResponseresponse)
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- jsp javaBean servlet mysql
![提示](https://static.bingdoc.com/images/bang_tan.gif)