07hnust

导航

2012年3月16日 #

访问资源包的方式

摘要: jsp页面:1、jsp页面中引入标签库<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>2、Struts标签<bean:message key="login.jsp.label.username" />Action类://获取请求的local信息Locale locale = getLocale(request);//获取资源包MessageResource message = getResource(request);//从资源包中得到信息文本并 阅读全文

posted @ 2012-03-16 12:00 07hnust 阅读(151) 评论(0) 推荐(0) 编辑

htmlerros标签应用

摘要: <bean:message key="login.jsp.page.heading" /> <html:errors /><!--返回所有的错误!--> <html:form action="login.do"> <table> <tr> <td><bean:message key="login.jsp.label.username" /> </td> <td><html:text property=" 阅读全文

posted @ 2012-03-16 11:34 07hnust 阅读(138) 评论(0) 推荐(0) 编辑

DispatchAction类一个Action中包含多个业务处理<测试通过>

摘要: 前台页面:DispatchActionTest.jsp<%@ page language="java" pageEncoding="UTF-8"%><%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%><%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%><html:html& 阅读全文

posted @ 2012-03-16 11:28 07hnust 阅读(186) 评论(0) 推荐(0) 编辑