package org.apache.jsp.route;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import bean.NoteBean;
import java.util.List;
import dao.NoteDAO;
public final class notes_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
private static java.util.List<String> _jspx_dependants;
private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector;
public java.util.List<String> getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
response.setContentType("text/html;charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
_jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("<!DOCTYPE html>\n");
out.write("<html>\n");
out.write(" <head>\n");
out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
out.write(" <title>留言板</title>\n");
out.write(" <link rel=\"stylesheet\" href=\"/WebApp/css/common.css\"/>\n");
out.write(" <link rel=\"stylesheet\" href=\"/WebApp/css/note.css\"/>\n");
out.write(" <style type=\"text/css\">\n");
out.write(" .note{\n");
out.write(" text-align: center;\n");
out.write(" height: 100%;\n");
out.write(" }\n");
out.write(" input{\n");
out.write(" width: 55%;\n");
out.write(" height: 2.8rem;\n");
out.write(" padding-left: 1rem;\n");
out.write(" }\n");
out.write(" textarea{\n");
out.write(" width: 60%;\n");
out.write(" height: 20rem;\n");
out.write(" display: block;\n");
out.write(" margin: 5rem auto;\n");
out.write(" word-wrap: break-word;\n");
out.write(" }\n");
out.write(" button{\n");
out.write(" width: 7rem;\n");
out.write(" height: 3rem;\n");
out.write(" background: #4789f1;\n");
out.write(" outline: none;\n");
out.write(" border: 0;\n");
out.write(" border-radius: 0.3rem;\n");
out.write(" color: #fff;\n");
out.write(" cursor: pointer;\n");
out.write(" }\n");
out.write(" #tip{\n");
out.write(" width: 14rem;\n");
out.write(" height: 6rem;\n");
out.write(" background: rgba(41, 40, 40, 0.75);\n");
out.write(" z-index: 1000;\n");
out.write(" border-radius: 0.4rem;\n");
out.write(" color: #fff;\n");
out.write(" display: none;\n");
out.write(" position: absolute;\n");
out.write(" }\n");
out.write("\n");
out.write(" #content{\n");
out.write(" height: 100%;\n");
out.write(" display: flex;\n");
out.write(" justify-content: space-around;\n");
out.write(" align-items: center;\n");
out.write(" }\n");
out.write(" </style>\n");
out.write(" </head>\n");
out.write(" <body>\n");
out.write(" ");
NoteDAO d = new NoteDAO();
List list = d.getNotes(0);
out.write("\n");
out.write(" <div class=\"note\">\n");
out.write(" <h2>留言板</h2>\n");
out.write(" <a style=\"color: #f10606;\" href=\"/WebApp/route/release.jsp\">发布留言</a>\n");
out.write(" <div class=\"note-list\">\n");
out.write(" ");
for(int i = 0; i<list.size(); i++){
NoteBean n = (NoteBean)list.get(i);
out.write("\n");
out.write(" <div class=\"list-item\">\n");
out.write(" <h3 class=\"title\"><a href=\"#\">");
out.print(n.getTitle());
out.write("</a></h3>\n");
out.write(" <p class=\"content\">");
out.print(n.getContent());
out.write("</p>\n");
out.write(" <p>\n");
out.write(" <span class=\"num\">浏览人数:");
out.print(n.getNum());
out.write("</span>\n");
out.write(" <span class=\"time\">添加时间:");
out.print(n.getAdd_time());
out.write("</span>\n");
out.write(" </p>\n");
out.write(" </div>\n");
out.write(" ");
}
out.write("\n");
out.write(" </div>\n");
out.write(" <footer>\n");
out.write(" <form>\n");
out.write(" <button>上一页</button>\n");
out.write(" <button>下一页</button>\n");
out.write(" </form>\n");
out.write(" </footer>\n");
out.write(" </div>\n");
out.write(" </body>\n");
out.write("</html>\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
jsp+javabean+servlet实现登录注册以及留言板
共78个文件
class:14个
jsp:14个
java:14个
需积分: 35 27 下载量 107 浏览量
2018-12-22
11:02:11
上传
评论 3
收藏 1.86MB RAR 举报
温馨提示
jsp+javabean+servlet使用简单的MVC模式实现登录注册、留言板、分页的功能。model(javabean)层实现读写数据库,数据库名为webapp,没有密码;view(JSP)实现展示信息;controller(servlet)层联系model和view,完成交互。
资源推荐
资源详情
资源评论
收起资源包目录
WebApp.rar (78个子文件)
WebApp
db.sql 2KB
src
conf
MANIFEST.MF 25B
java
utils
DB.java 2KB
dao
AddUser.java 3KB
UserDAO.java 4KB
Note.java 3KB
Register.java 3KB
NoteDAO.java 4KB
Comment.java 3KB
Login.java 3KB
bean
NoteBean.java 2KB
UserBean.java 3KB
CommentBean.java 2KB
web
WEB-INF
lib
mysql-connector-java-5.1.39-bin.jar 966KB
web.xml 2KB
route
reg.jsp 3KB
welcome.jsp 2KB
notes.jsp 2KB
release.jsp 4KB
self.jsp 3KB
login.jsp 2KB
article.jsp 3KB
index.html 258B
images
s.png 1KB
META-INF
context.xml 65B
css
index.css 2KB
note.css 942B
login.css 1KB
detail.css 468B
common.css 265B
build
empty
generated-sources
ap-source-output
generated
src
org
apache
jsp
route
notes_jsp.class.smap 171B
login_jsp.class.smap 112B
welcome_jsp.class.smap 84B
login_jsp.java 5KB
notes_jsp.java 7KB
welcome_jsp.java 6KB
classes
org
apache
jsp
route
welcome_jsp.class 6KB
notes_jsp.class 7KB
login_jsp.class 6KB
web
WEB-INF
classes
utils
DB.class 2KB
model
.netbeans_update_resources 0B
dao
Comment.class 2KB
UserDAO.class 4KB
Login.class 2KB
AddUser.class 2KB
Register.class 2KB
NoteDAO.class 4KB
Note.class 2KB
util
user
.netbeans_automatic_build 0B
api
bean
UserBean.class 2KB
NoteBean.class 1KB
CommentBean.class 1KB
lib
mysql-connector-java-5.1.39-bin.jar 966KB
web.xml 2KB
route
reg.jsp 3KB
welcome.jsp 2KB
notes.jsp 2KB
release.jsp 4KB
self.jsp 3KB
login.jsp 2KB
article.jsp 3KB
index.html 306B
images
s.png 1KB
META-INF
MANIFEST.MF 25B
context.xml 65B
css
index.css 2KB
note.css 942B
login.css 1KB
detail.css 468B
common.css 265B
test
build.xml 3KB
nbproject
genfiles.properties 473B
project.properties 4KB
private
private.xml 420B
private.properties 508B
ant-deploy.xml 4KB
build-impl.xml 80KB
project.xml 936B
共 78 条
- 1
资源评论
星辰之嗨
- 粉丝: 5
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功