首页>代码>ssh(hibernate+struts+spring)框架实现简单新闻发布系统>/NewsInfoSystem/src/action/news/ShowAllNewsAction.java
package action.news; import service.NewsService; import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; import java.util.List; @SuppressWarnings("serial") public class ShowAllNewsAction extends ActionSupport { private NewsService newsService; // 业务逻辑处理组件,用接口定义,不用类定义 private String name; public NewsService getNewsService() { return newsService; } public void setNewsService(NewsService newsService) { this.newsService = newsService; } public String getName() { return name; } public void setName(String name) { this.name = name; } @SuppressWarnings("rawtypes") public String execute() throws Exception { String _name = name; if (name != null) { _name = new String(name.getBytes("iso8859-1"), "gb2312"); } List all = newsService.queryAllNews(_name); ServletActionContext.getRequest().setAttribute("all", all); return SUCCESS; } }

微信网友_6248713511227392 LV11
2022年12月5日
顾北城 LV12
2022年5月26日
and123456 LV11
2022年3月21日
1798139161 LV4
2022年2月9日
xxxhhh1314 LV7
2022年1月9日
5555sd6asd3a2d3 LV6
2021年12月17日
uuuuuuuuuuuwwwwww LV3
2021年12月14日
lsglsg9 LV23
2021年11月24日
1057148049 LV11
2021年6月16日
zxm0317 LV10
2021年1月4日

微信网友_7005760998215680 LV6
2024年10月2日
微信网友_6784866726285312
2023年12月26日
暂无贡献等级
WBelong LV8
2023年12月25日
19542347615 LV1
2023年11月23日
你爹正在加载中 LV4
2023年9月11日
多加两块钱 LV4
2023年6月20日
yemmmm666 LV1
2023年6月12日
n99999
2023年6月10日
暂无贡献等级
微信网友_6509705287716864 LV2
2023年6月8日
WWW1234567 LV2
2023年6月4日