上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 42 下一页
摘要: 后台action不能通过request等获取前台数据, 如果有人登陆了, 会往session设定值, 怎么实现呢? action如何往session里设定值? 所以action访问 request, session,application等web元素的方法? 总结: 1. jsp调用action 2 阅读全文
posted @ 2016-02-20 09:47 wujixing909 阅读(153) 评论(0) 推荐(0) 编辑
摘要: action没有request, response等属性, 无法往前台传信息, 出来一个概念, valuestack: 存放action的属性, 还有各种error等... <s:property>专门取valuestack和context的属性 jsp显示文件: 使用addFieldError方法 阅读全文
posted @ 2016-02-20 09:33 wujixing909 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 有中文的情况下, form method都要用post: 如果jsp输入中文返回到后台action输出时会显示乱码, struts.xml已经设置 <constant name="struts.i18n.encoding" value="GBK" /> 把filter2.1配置改成2.0的即可: < 阅读全文
posted @ 2016-02-20 08:54 wujixing909 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1. JSP文件调用格式: <a href="user/user!add?name=a&age=8">添加用户</a> 2. struts.xml文件: <package name="user" extends="struts-default" namespace="/user"> <action 阅读全文
posted @ 2016-02-20 08:45 wujixing909 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 1. JSP文件调用格式: 2. struts.xml文件: 3. action文件:和jsp传递过来的name和age一一对应传值进去 Model: 衍伸: DTO:通过DTO new一个User对象出来,把值传过去: newUser(UserDTO dto)() 阅读全文
posted @ 2016-02-20 08:39 wujixing909 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 1. JSP文件调用格式: <a href="user/user!add?name=a&age=8">添加用户</a> 2. struts.xml文件: <package name="user" extends="struts-default" namespace="/user"> <action 阅读全文
posted @ 2016-02-20 08:25 wujixing909 阅读(543) 评论(0) 推荐(0) 编辑
摘要: 1. header, sidebar,welcome,footer 4个jsp文件 WEB-INF目录下创建模板文件: commons文件夹下 footer.jsp header.jsp layout.jsp sidebar.jsp welcome.jsp 阅读全文
posted @ 2016-02-19 17:21 wujixing909 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Myeclipse添加struts包后, 想重新加载的方法: 1. myelicpse,右键项目,选close project 2. 找到项目所在目录, 打开.classpath删除带有struts2 core字样的行,再删除.bak文件 删除.mystrutsdata文件 删除.project里最 阅读全文
posted @ 2016-02-19 17:11 wujixing909 阅读(312) 评论(0) 推荐(0) 编辑
摘要: TestNullOrEmpty.java public class TestNullOrEmpty { public static void main(String[] args) { String value = null; testNullOrEmpty(value); value = ""; 阅读全文
posted @ 2016-02-19 11:51 wujixing909 阅读(341) 评论(0) 推荐(0) 编辑
摘要: CREATE DATABASE db_studentinfo; USE db_studentinfo ; DROP TABLE IF EXISTS t_student ; CREATE TABLE t_student( studentId varchar(40) NOT NULL, stuNo va 阅读全文
posted @ 2016-02-18 18:22 wujixing909 阅读(2855) 评论(0) 推荐(0) 编辑
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 42 下一页