Loading

摘要: <s:form> <%-- 1.普通输入项--%> <s:textfield name="username" label="username"></s:textfield> <%-- 2.密码输入项--%> <s:password name="password" label="password">< 阅读全文
posted @ 2021-04-10 21:03 IamHzc 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 一、root、context 二、#的使用 三、%的使用 1.在struts2标签中表单标签 (1)在struts2标签里面使用ognl表达式,如果直接在struts2表单标签里面使用ognl表达式不识别,只有%后 才会识别。 阅读全文
posted @ 2021-04-10 20:13 IamHzc 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 为什么EL表达式可以获取值栈数据? 1.EL表达式获取域对象值。 2.向域对象里面放值使用setAttribute方法,获取值使用getAtrribute方法。 3.底层增强request对象里面的方法getAttribute方法。 (1)首先从request域获取值,如果获取得到,直接返回。 (2 阅读全文
posted @ 2021-04-10 19:56 IamHzc 阅读(59) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/2210235/202104/2210235-20210410192120912-1732696895.png) 阅读全文
posted @ 2021-04-10 19:22 IamHzc 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 一、值栈存入数据的三种方式 值栈:struts2里面提供本身一种存储机制,类似域对象,可以存值和取值。 1.获取值栈对象,调用值栈对象的set方法。 ActionContext context = ActionContext.getContext(); ValueStack stack = cont 阅读全文
posted @ 2021-04-10 10:59 IamHzc 阅读(142) 评论(0) 推荐(0) 编辑