Skip to content

Commit

Permalink
修改 部分文件
Browse files Browse the repository at this point in the history
  • Loading branch information
lenovo2512009 committed Mar 6, 2017
1 parent bf9669b commit 2437b6c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions group09/610673813/src/coding/week02/ReadXml.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ public ReadXml(String filename) {
document = new SAXReader().read((filename));
hashMap = new HashMap<String, String>();
} catch (DocumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public String parseXml(String actionName) {

// List<?> actions = document.selectNodes("//struts/action");
String className = null;
Element root = document.getRootElement();
List<?> actions = root.elements("action");
Expand Down
7 changes: 1 addition & 6 deletions group09/610673813/src/coding/week02/Struts.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,14 @@ public static Object initAction(String classNameString) {
try {
actionClass = Class.forName(classNameString);
} catch (ClassNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Object newObject = null;
try {
newObject = actionClass.newInstance();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return newObject;
Expand All @@ -88,7 +85,7 @@ public static void excuteMethod(Map<String, String> parameters) {
excuteString = (String) excuteMethod.invoke(object);

} catch (Exception e) {
// TODO: handle exception

}
}

Expand All @@ -103,9 +100,7 @@ public static Map<String, String> setMapParameter() {
try {
String value = (String) getterMethods[i].invoke(object);
hashMap.put(getterName.substring(3).toLowerCase(), value);
//System.out.println("----" + getterName.substring(2));
} catch (Exception e) {
// TODO: handle exception
}

}
Expand Down

0 comments on commit 2437b6c

Please sign in to comment.