public class SelectAction {
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res
){
MainLoginForm rf=(MainLoginForm)form;
String method=rf.getMethod();
String id=rf.getId();
String strSQL="";
String xml_start="<?xml version=\"1.0\" encoding=\"GBK\"?>";
xml_start+="<selects>";
String xml_end="</selects>";
String xml="<select><value>0</value><text>--</text></select>";
DBCPool dbc= new DBCPool();
Connection conn=dbc.getConnection("wy_manager");
Statement stmt=null;
if(conn!=null){
try{
stmt=conn.createStatement();
}catch(SQLException err){
System.out.println(err.getMessage());
}
}
if(method.equals("g1")){
strSQL="select cityID id,city name from city where father="+id;
}else if(method.equals("g1")){
strSQL="select areaID id,area name from area where father="+id;
}
ResultSet rs=null;