Skip to content

Commit

Permalink
update Template.java
Browse files Browse the repository at this point in the history
  • Loading branch information
dotype committed Feb 4, 2020
1 parent 492daef commit 933efbf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/main/java/hellojsp/util/Template.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class Template {
protected Hashtable<String, String> var = new Hashtable<String, String>();
protected Hashtable<String, DataSet> loop = new Hashtable<String, DataSet>();
protected Writer out = null;
private PageContext pageContext = null;
private HttpServletRequest request = null;
private HttpServletResponse response = null;
private boolean debug = false;
Expand Down Expand Up @@ -84,10 +83,6 @@ public void setRequest(HttpServletRequest request) {
}
}

public void setPageContext(PageContext pc) {
pageContext = pc;
}

public void setRoot(String path) {
root = path + "/";
}
Expand Down Expand Up @@ -324,10 +319,7 @@ private void parseTag(String buffer) throws Exception {
} else if(cmd.startsWith("@execute(")) {
String[] names = parseCmd(cmd);
if(names == null) continue;

if(null != pageContext) {
pageContext.include(names[2]);
} else if(null != request && null != response) {
if(null != request && null != response) {
RequestDispatcher dispatcher = request.getRequestDispatcher(names[2]);
dispatcher.include(request, response);
}
Expand Down

0 comments on commit 933efbf

Please sign in to comment.