67,513
社区成员
发帖
与我相关
我的任务
分享
<package name="struts2" namespace="/" extends="struts-default">
<action name="test" class="org.shaw.web.TestAction">
<interceptor-ref name="defaultStack"/>
<result name="success">/index.jsp</result>
</action>
</package>
public class TestAction extends ActionSupport {
private static final long serialVersionUID = 1L;
private File f;
private String fFileName;
private String fContentType;
public String execute() throws Exception {
System.out.println(f == null ? "null" : f.getPath());
System.out.println(fFileName);
return super.execute();
}
public File getF() {
return f;
}
public void setF(File f) {
this.f = f;
}
public String getfFileName() {
return fFileName;
}
public void setfFileName(String fFileName) {
this.fFileName = fFileName;
}
public String getfContentType() {
return fContentType;
}
public void setfContentType(String fContentType) {
this.fContentType = fContentType;
}
}