看了尚学堂老师视屏,学了不少。这是个人的struts2的笔记
1.copy和import project的时候--
10_尚学堂马士兵_Struts2_Struts2_Namespace_命名空间.avi
2.
jsp设置中文---windows-jsp-china...
3.
strut2中的路径是根据action的路径而不是jsp路径来确定的,所以尽量不要使用相对路径---解决方法,统一使用绝对路径
4.
通配符约定优于配置
5.
传参---
6.
ActionAttr接收参数
DomainModel接收参数(最常用);
ModelDriven接收参数
7.有中文的传参--有post
8.
tag(标签)<%@taglib uri="/struts-tags" prefix="t" %>
9.dmi传参
10.
DI--dependency injection
IoC--inverse of control
11.
模块包含--strut.xml的包含
12.
Service:throws SQLException
throws e
Action:throws Exception
<exception-mapping result="error" >
13.118N
a)Action-Package-App
b)一般只用App struts.xml.custom.il8n
b)PropertiesEditor插件
解压features Plugin覆盖eclipse目录里面的
14.动态语言切换
传参数 locale=en_US