package com.demo.account;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
public class ShowParamsAction extends ActionSupport {
private static final long serialVersionUID = -7919288320923232999L;
private Date currTime;
private String actionClass = ShowParamsAction.class.toString();
Map<String, String> params = new HashMap<String, String>();
public String getActionClass() {
return actionClass;
}
public void setActionClass(String actionClass) {
this.actionClass = actionClass;
}
private String t;
public Date getCurrTime() {
return currTime;
}
public void setCurrTime(Date currTime) {
this.currTime = currTime;
}
public String getT() {
return t;
}
public void setT(String t) {
this.t = t;
}
public String execute() throws Exception {
currTime = new Date();
Map<String, Object> ps = ActionContext.getContext().getParameters();
for (Iterator<Map.Entry<String, Object>> iter = ps.entrySet().iterator(); iter.hasNext();) {
Map.Entry<String, Object> entry = iter.next();
String key = entry.getKey();
Object value = entry.getValue();
params.put(key, Arrays.toString((String[]) value));
}
if (t == null) return "error";
else return SUCCESS;
}
public Map<String, String> getParams() {
return params;
}
public void setParams(Map<String, String> params) {
this.params = params;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
freemarker示例工程
共42个文件
ftl:7个
jar:7个
java:6个
4星 · 超过85%的资源 需积分: 9 50 下载量 178 浏览量
2011-10-08
16:04:31
上传
评论
收藏 6.24MB ZIP 举报
温馨提示
freemarker示例工程 struts2 + freemarker2.3
资源推荐
资源详情
资源评论
收起资源包目录
demo.freemarker.zip (42个子文件)
.project 1KB
.pmd 29KB
WebContent
WEB-INF
ftl
account
Index.ftl 225B
ShowParams.ftl 213B
List.ftl 246B
login.ftl 303B
welcome.ftl 171B
Sample.ftl 225B
manage
Index.ftl 225B
lib
javassist-3.7.ga.jar 531KB
xwork-core-2.2.1.1.jar 997KB
struts2-core-2.2.1.1.jar 755KB
commons-io-1.3.2.jar 86KB
commons-fileupload-1.2.1.jar 56KB
freemarker-2.3.16.jar 860KB
ognl-3.0.jar 224KB
web.xml 1KB
index.html 495B
error.jsp 14B
META-INF
MANIFEST.MF 39B
demo.freemarker.war 3.12MB
src
action
LoginAction.java 870B
SampleAction.java 854B
struts-default.xml 1KB
com
demo
account
ListAction.java 1KB
IndexAction.java 862B
ShowParamsAction.java 2KB
manage
IndexAction.java 861B
.settings
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.common.project.facet.core.xml 305B
org.eclipse.jdt.core.prefs 395B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.component 475B
.jsdtscope 503B
build
classes
action
SampleAction.class 1KB
LoginAction.class 1KB
struts-default.xml 1KB
com
demo
account
ListAction.class 2KB
IndexAction.class 1KB
ShowParamsAction.class 3KB
manage
IndexAction.class 1KB
.classpath 588B
共 42 条
- 1
joeblow
- 粉丝: 2
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页