崩溃的404 求指教 能查出结果就是不返回success
web页面
<form action="xianshi.action" method="post">
<input type="submit" value="submit">
</form>
struts.xml
<package name="zhou" extends="struts-default">
<action name="upload" class="cn.fileupload.action.FileUploadAction">
<param name="savePath">/upload</param>
<result name="success">/show.jsp</result>
<result name="input">/upload.jsp</result>
</action>
<action name="xianshi.action" class="cn.fileupload.action.XianshiAction">
<result name="success">/xianshi.jsp</result>
<result name="input">/index.jsp</result>
</action>
</package>
action 页面
package cn.fileupload.action;
import com.opensymphony.xwork2.ActionSupport;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import shiti.*;
public class XianshiAction extends ActionSupport {
public List<XinXi> list;
public List<XinXi> infolist = new ArrayList<XinXi>();
public List<XinXi> getList() {
return list;
}
public void setList(List<XinXi> list) {
this.list = list;
}
public String execute() throws Exception {
String url = "jdbc:mysql://localhost:3306/";
String dbName = "sp";
String driverName = "com.mysql.jdbc.Driver";
String userName = "root";
String passWord = "123";
Connection con = null;
Statement stmt = null;
try {
Class.forName(driverName).newInstance();
con = DriverManager.getConnection(url + dbName, userName, passWord);
stmt = con.createStatement();
} catch (Exception e) {
System.out.println(e.getMessage());
}
String sql = "select * from sinfor";
stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(sql);
System.out.println(sql);
while(rs.next()){
System.out.println("hello world");
XinXi xx=new XinXi();
xx.setSid(rs.getString("sid"));
xx.setFileName(rs.getString("fileName"));
xx.setTime(rs.getString("time"));
xx.setUid(rs.getString("uid"));
infolist.add(xx);
System.out.println(list);
System.out.println(infolist);
System.out.println(rs.getString("sid"));
System.out.println(rs.getString("fileName"));
System.out.println(rs.getString("time"));
System.out.println(rs.getString("uid"));
}
this.setList(infolist);
System.out.println("error!!!!!!!!!");
return SUCCESS;
}
}
bean页面
package shiti;
public class XinXi {
private String sid;
private String fileName;
private String time;
private String uid;
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getTime() {
return time