forked from onlyliuxin/coding2017
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from onlyLYJ/master
Struts done
- Loading branch information
Showing
25 changed files
with
227 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...coding/basic/Collection/AbstractList.java → ...coding/basic/collection/AbstractList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Collection; | ||
package collection; | ||
|
||
public abstract class AbstractList<E> implements List<E> { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...293/coding/basic/Collection/Iterator.java → ...293/coding/basic/collection/Iterator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Collection; | ||
package collection; | ||
|
||
public interface Iterator<E> { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...2266293/coding/basic/Collection/List.java → ...2266293/coding/basic/collection/List.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Collection; | ||
package collection; | ||
|
||
public interface List<E> { | ||
|
||
|
6 changes: 3 additions & 3 deletions
6
.../basic/Collection/Concrete/ArrayList.java → .../basic/collection/concrete/ArrayList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...c/Collection/Concrete/BinaryTreeNode.java → ...c/collection/concrete/BinaryTreeNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ding/basic/Collection/Concrete/Queue.java → ...ding/basic/collection/concrete/Queue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ding/basic/Collection/Concrete/Stack.java → ...ding/basic/collection/concrete/Stack.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...coding/basic/TestCollection/AllTests.java → ...oding/basic/test/collection/AllTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...oding/basic/TestCollection/QueueTest.java → ...ding/basic/test/collection/QueueTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package util; | ||
|
||
import java.util.List; | ||
import org.dom4j.Document; | ||
import org.dom4j.DocumentException; | ||
import org.dom4j.Element; | ||
import org.dom4j.Node; | ||
import org.dom4j.io.SAXReader; | ||
|
||
import static util.Print.*; | ||
|
||
public class ActionXMLreader { | ||
|
||
public Node getRootNode(String add) { | ||
SAXReader reader = new SAXReader(); | ||
Document document = null; | ||
Node root = null; | ||
try { | ||
document = reader.read(add); | ||
root = document.getRootElement(); | ||
} catch (DocumentException e) { | ||
e.printStackTrace(); | ||
} | ||
return root; | ||
} | ||
|
||
public String parseClass(Node root, String attr) { | ||
|
||
@SuppressWarnings("rawtypes") | ||
List list = root.selectNodes("action[@name='" + attr + "']"); | ||
String clazz = null; | ||
for(Object o:list){ | ||
Element e = (Element) o; | ||
clazz = e.attributeValue("class"); | ||
} | ||
return clazz; | ||
} | ||
|
||
public String parseResult(Node root, String attr, String result) { | ||
|
||
@SuppressWarnings("rawtypes") | ||
List list = root.selectNodes("action[@name='" + attr + "']/result[@name='" + result + "']"); | ||
|
||
String jsp = null; | ||
for(Object o:list){ | ||
Element e = (Element) o; | ||
jsp = e.getTextTrim(); | ||
} | ||
return jsp; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/dom4j-1.6.1.zip | ||
/jaxen-1.1-beta-6.jar | ||
/dom4j-1.6.1.jar |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...382266293/src/litestruts/LoginAction.java → ...rc/com/coderising/action/LoginAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package litestruts; | ||
package com.coderising.action; | ||
|
||
/** | ||
* 这是一个用来展示登录的业务类, 其中的用户名和密码都是硬编码的。 | ||
|
Oops, something went wrong.