随笔分类 - Struts2
摘要:The template If you use JSPs as the template engine you won't be able to test the action output outside the container. The Embedded JSP Plugin can be used to overcome this limitation and be able to use JSPs from the classpath and outside the container.executeAction(String) Pass the url for the..
阅读全文
摘要:获取List<s:property value="list" />获取List中的某一个元素<s:property value="list[0]" />获取List的大小<s:property value="list.size" />获取Set<s:property value="set" /> 无法获取Set中的某一个元素,因为Set没有顺序获取Map<s:property value="map" />获取Map中所有key的值<
阅读全文
摘要:struts-default:<package name="struts-default" abstract="true"> <!-- 默认的result 类型 --> <result-types> <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult"/> <result-type name="dispatcher" class="or
阅读全文
摘要:EL 1.语法结构 ${expression} 2.[]与.运算符 EL 提供.和[]两种运算符来存取数据。 当要存取的属性名称中包含一些特殊字符,如.或?等并非字母或数字的符号,就一定要使用 []。例如: ${user.My-Name}应当改为${user["My-Name"] } 如果要动态取值时,就可以用[]来做,而.无法做到动态取值。例如: ${sessionScope.user[data]}中data 是一个变量 3.变量 EL存取变量数据的方法很简单,例如: ${username}。它的意思...
阅读全文
摘要:<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%><%@ taglib prefix="sx" uri="/struts-tags"%><%@ taglib prefix="s" uri="/struts-dojo-tags"%><!DOCTYPE html PUBLIC "-//W3
阅读全文

浙公网安备 33010602011771号