参考http://www.iteye.com/problems/79605
spring的配置:
1.classpath*:spring.xml
| <?xml version="1.0" encoding="UTF-8"?> </beans> |
注意:红字部分是必须包含的,否则不能编译通过,标签内容是关于annotion方式注册。
2.web.xml
| <!-- 加载Spring容器配置 --> <listener>
|
struts的配置
1.classpath*:struts.xml
| <?xml version="1.0" encoding="UTF-8" ?> <struts> <!-- struts.devMode : 是否设置为开发模式 true:是开发模式,否则不是 --> |
2.web.xml
| <filter> <filter-mapping> |
3.strust2模块配置文件struts_fee.xml
| <?xml version="1.0" encoding="UTF-8" ?> <struts> |
action类FeeInfoAction.java
| package com.at.fee.action; import java.util.List; import javax.annotation.Resource; import net.sf.json.JSONArray; import org.apache.struts2.ServletActionContext; import com.at.fee.model.FeeInfo; @Scope("prototype") public String searchFeeInfo(){ } |
service类feeInfoService.java
| @Service 。。。 } |
jsp页面调用
http://xxx/fee/searchFeeInfo.do

1万+

被折叠的 条评论
为什么被折叠?



