摘要:
在表单提交的时候传值是这样,name=admin.username name=admin.password,然后在action中定义属性admin生成get和set也可以实现ModelDriven这个泛型接口public class HomeAction extends BasicAction im... 阅读全文
posted @ 2015-04-28 10:11
itliucheng
阅读(197)
评论(0)
推荐(0)
摘要:
在开发中我们需要打印出来一些来判断程序的运行的 判断用户的使用情况,比如他说他账户订单被无故取消了,我们就可以查看日志判断是谁取消的1.添加对jar包的依赖.log4j2.需要配置文件 log4j.properties 方式1: log4j.appender.consoleOut... 阅读全文
posted @ 2015-04-28 10:09
itliucheng
阅读(345)
评论(0)
推荐(0)
摘要:
OGNL对象图导航语言,类似于el表达式,strut的底层就是用这个写的在导入struts-core的时候会导入ognl.jarpublic class Test { public static void main(String[] args) throws OgnlException { ... 阅读全文
posted @ 2015-04-28 10:02
itliucheng
阅读(205)
评论(0)
推荐(0)
摘要:
导入这个插件,该插件的作用是替换掉struts.xml 原则是没有配置,全是约定基本步骤 1.新建HomeAction,里面有个execute方法return success,请求home.action就这样就能执行这个 约定:home就是以前配置中的action的name属性值,没有方法名... 阅读全文
posted @ 2015-04-28 09:57
itliucheng
阅读(232)
评论(0)
推荐(0)
摘要:
文件上传jsp中文件上传案例fileaction中@Override public String execute() throws Exception { return SUCCESS; }配置xml,记得在struts.xml中导入这个xml, 是修改默认文件上传大小限制 ... 阅读全文
posted @ 2015-04-28 09:42
itliucheng
阅读(222)
评论(0)
推荐(0)
浙公网安备 33010602011771号