1.上午没啥可记的,困的要死
2.<action name="zhurufirst" class="com.clannan.action.FirstAction">
<!-- 向action内注入属性,非常有用处! -->
<param name="savepath">/images</param>
<result name="input">/login.jsp</result>
<result name="success">/Result.jsp?username=${username}</result>
</action>
public class FirstAction {
private String message;
private String username;
private String savepath;
public String getMessage() {
return message;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public void setSavepath(String savepath) {
this.savepath = savepath;
}
public String getSavepath() {
return savepath;
}
3.
各种有用的常量
<constant name="struts.i18n.encoding" value="UTF-8"/>
<constant name="struts.custom.i18n.resources" value="message,code" />
<constant name="struts.action.extension" value="do"/>
<!-- 开发阶段最好设为false,上线后设置为true 静态页面缓存 -->
<constant name="struts.serve.static.browserCache" value="false"/>
<!-- 修改此文件,不需要重启服务器了! -->
<constant name="struts.configuration.xml.reload" value="true"/>
<constant name="struts.devMode" value="true"/>
<constant name="struts.ui.theme" value="simple"/>
<constant name="struts.objectFactory" value="spring"/>
4.配置多个配置文件
<include file="first.xml"></include>