随笔分类 -  02 JavaWeb Demo

ExceptionDemo
摘要:功能: 利用struts.xml 捕获异常 不满足这三个值就报异常 1.web.xml 2.UserAction.java 3.SecurityException.java 4.index.jsp 5.struts.xml 6.Exception.jsp/ SQLException.jsp/ Log 阅读全文
posted @ 2016-05-16 11:50 程序员修仙之路 阅读(432) 评论(0) 推荐(0)
ModelDriven
摘要:功能: submit 之后显示结果 1.项目结构 2.web.xml 3.UserModel.java 4.LoginAction.java 5.index.jsp 6.struts.xml 7.success.jsp 阅读全文
posted @ 2016-05-16 08:44 程序员修仙之路 阅读(410) 评论(0) 推荐(0)
DMI ( Dynamic Method Invocation )
摘要:功能: 点击 hello , 调用 execute 函数 点击 update , 调用 update 函数 1.项目结构 2.web.xml 3.UserAction.java 4.index.jsp 5.struts.xml 6.hello.jsp 7.update.jsp 阅读全文
posted @ 2016-05-15 18:02 程序员修仙之路 阅读(230) 评论(0) 推荐(0)
redirect-action
摘要:功能: 点击login , redirect 到hello.jsp 显示 "hello" 点击redirect, redirect 到 error.jsp 显示 "error" 1.创建Struts2 工程 2.web.xml 3.index.jsp 4.LoginAction.java 5.Use 阅读全文
posted @ 2016-05-14 20:37 程序员修仙之路 阅读(716) 评论(0) 推荐(0)
struts2.3 创建工程
摘要:1:在该网站下载struts2.3.16.3,目前为最新版。http://www.struts.apache.org/download.cgi 不妨下载“Full Distribution”版本 下载完后解压。 2. 用eclipse创建一个Dynamic Web project项目 这里要注意一点 阅读全文
posted @ 2016-05-07 18:25 程序员修仙之路 阅读(237) 评论(0) 推荐(0)