1、
跟路径:${pageContext.request.contextPath}
2、
<html:text property="saleChance.chanceSource"/> property的值与FormBean中的属性绑定
<html:select property="condition.qxid" style="width:80px;" property的值与FormBean中的属性完全一致!
<html:optionsCollection name="qxList" lable="qx" value="qxid" /> name表示在范围page|request|session|application中的对象
</html:select>
3、<c:choose>用于条件选择,他和<c:when><c:otherwise>一起使用,他们只能组合在一起使用:
</c:choose>
4.
a、
struts1中得到application对象:
ServletContext application = request.getSession().getServletContext
b、
struts2中得到request、response、session、application:
ActionContext ctx = ActionContext.getContext();
Map session = ActionContext.getContext().getSession();
Map application = ActionContext.getContext().getApplication();
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getResponse();
c、
servlet中得到application对象:
ServletContext application = httpServletRequest.getSession().getServletContext();或
ServletContext application = getServletConfig.getServletContext();