XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application- P13
Số trang: 50
Loại file: pdf
Dung lượng: 167.03 KB
Lượt xem: 12
Lượt tải: 0
Xem trước 5 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application- P13: Là một nhà phát triển Web, bạn biết những thách thức trong việc xây dựng các ứng dụng mạnh mẽ trên nhiều nền tảng. Tạo các ứng dụng di động trở nên thật sự có thể bằng cách sử dụng Java cho code và XML để tổ chức và quản lý dữ liệu. "XML, XSLT, Java, và JSP: Một trường hợp học" sẽ giúp bạn tối đa hóa khả năng của XML, XSLT, Java, và JSP trong các ứng dụng web của bạn....
Nội dung trích xuất từ tài liệu:
XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application- P13582 Appendix C Source Code for bonForum Web Application * XML document specification. * ForestHashtable is described fully in the book: * XML, XSLT, Java and JSP - A Case Study in Developing a Web Application, * by Westy Rockwell, published by * New Riders. * Translation to German published by * Galileo Press. * For further information visit the open source * BonForum Project on SourceForge * @author Westy Rockwell */ public class ForestHashtable extends java.util.Hashtable { private NodeNameHashtable nodeNameHashtable; private PathNameHashtable pathNameHashtable; private boolean lastRootNodeFound; private boolean lastChildOfRootNodeFound; // next one defined further down for recursion // private boolean lastChildOfNonRootNodeFound; private String currentRootNodeAKey; private String currentRootNodeBKey; private String currentRootNodeCKey; // for debug only private String currentChildOfRootNodeAKey; private String currentChildOfRootNodeBKey; private String currentChildOfRootNodeCKey; // for debug only // next 3 defined further down for recursion // private String currentChildOfNonRootNodeAKey; // private String currentChildOfNonRootNodeBKey; // private String currentChildOfNonRootNodeCKey; private static BonLogger logFH = null; // Controls logger output. private static String logging = null; // False until logger ready. private static boolean loggingInitialized = false; // for logging output, when no sessionId available private static String sessionId = “0000000000”; private static final int NO_NODEKEY_KEY_PREFIX = 0; private static final int SESSION_ID = 1; private static final int SESSION_ID_AND_CREATION_TIME = 2; private String uniqueNodeKeyKeyList = “message;messageKey”; /** Sets uniqueNodeKeyKeyList of node names unique per session * in nodeNameHashtable. Determines key prefix choice. * Node names in list can have one key per session * Node names not in list can have multiple keys per session * This saves space by not storing keys for unused nodeKey entries. * (Note: applies only adding children to non-root nodes.). * */ protected void setUniqueNodeKeyKeyList(String newUniqueNodeKeyKeyList) { uniqueNodeKeyKeyList = newUniqueNodeKeyKeyList; } /** Gets uniqueNodeKeyKeyList setting. C.22 Filename: ProjectsonForumsrcde arentforumForestHashtable.java 583 * (see set method for details) * * @return String uniqueNodeKeyKeyList */ public String getUniqueNodeKeyKeyList() { return uniqueNodeKeyKeyList; } /** Creates a ForestHashtable with the default capacity. */ public ForestHashtable() { super(); nodeNameHashtable = new NodeNameHashtable(); pathNameHashtable = new PathNameHashtable(); } /** Creates a ForestHashtable of a given capacity. * * @param capacity initialCapacity of parent java.util.Hashtable */ public ForestHashtable(int capacity) { super(capacity); nodeNameHashtable = new NodeNameHashtable(); pathNameHashtable = new PathNameHashtable(); } private void log(String sessionId, String where, String what) { if(logging != null) { logFH.logWrite(System.currentTimeMillis(), sessionId, where,what); } } /** Gets logging setting. * * @return String logging */ public String getLogging() { return logging; } /** Sets logging setting. * * @param String setting for logger logtype (“none”,”all”,”std”,”file”) */ protected void setLogging(String newLogging) { logging = newLogging; synchronized(this) { if(!loggingInitialized) { System.err.println(“ForestHashtable initloggingInitialized:” + loggingInitialized); System.err.println(“ForestHashtable init logging:” +logg ...
Nội dung trích xuất từ tài liệu:
XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application- P13582 Appendix C Source Code for bonForum Web Application * XML document specification. * ForestHashtable is described fully in the book: * XML, XSLT, Java and JSP - A Case Study in Developing a Web Application, * by Westy Rockwell, published by * New Riders. * Translation to German published by * Galileo Press. * For further information visit the open source * BonForum Project on SourceForge * @author Westy Rockwell */ public class ForestHashtable extends java.util.Hashtable { private NodeNameHashtable nodeNameHashtable; private PathNameHashtable pathNameHashtable; private boolean lastRootNodeFound; private boolean lastChildOfRootNodeFound; // next one defined further down for recursion // private boolean lastChildOfNonRootNodeFound; private String currentRootNodeAKey; private String currentRootNodeBKey; private String currentRootNodeCKey; // for debug only private String currentChildOfRootNodeAKey; private String currentChildOfRootNodeBKey; private String currentChildOfRootNodeCKey; // for debug only // next 3 defined further down for recursion // private String currentChildOfNonRootNodeAKey; // private String currentChildOfNonRootNodeBKey; // private String currentChildOfNonRootNodeCKey; private static BonLogger logFH = null; // Controls logger output. private static String logging = null; // False until logger ready. private static boolean loggingInitialized = false; // for logging output, when no sessionId available private static String sessionId = “0000000000”; private static final int NO_NODEKEY_KEY_PREFIX = 0; private static final int SESSION_ID = 1; private static final int SESSION_ID_AND_CREATION_TIME = 2; private String uniqueNodeKeyKeyList = “message;messageKey”; /** Sets uniqueNodeKeyKeyList of node names unique per session * in nodeNameHashtable. Determines key prefix choice. * Node names in list can have one key per session * Node names not in list can have multiple keys per session * This saves space by not storing keys for unused nodeKey entries. * (Note: applies only adding children to non-root nodes.). * */ protected void setUniqueNodeKeyKeyList(String newUniqueNodeKeyKeyList) { uniqueNodeKeyKeyList = newUniqueNodeKeyKeyList; } /** Gets uniqueNodeKeyKeyList setting. C.22 Filename: ProjectsonForumsrcde arentforumForestHashtable.java 583 * (see set method for details) * * @return String uniqueNodeKeyKeyList */ public String getUniqueNodeKeyKeyList() { return uniqueNodeKeyKeyList; } /** Creates a ForestHashtable with the default capacity. */ public ForestHashtable() { super(); nodeNameHashtable = new NodeNameHashtable(); pathNameHashtable = new PathNameHashtable(); } /** Creates a ForestHashtable of a given capacity. * * @param capacity initialCapacity of parent java.util.Hashtable */ public ForestHashtable(int capacity) { super(capacity); nodeNameHashtable = new NodeNameHashtable(); pathNameHashtable = new PathNameHashtable(); } private void log(String sessionId, String where, String what) { if(logging != null) { logFH.logWrite(System.currentTimeMillis(), sessionId, where,what); } } /** Gets logging setting. * * @return String logging */ public String getLogging() { return logging; } /** Sets logging setting. * * @param String setting for logger logtype (“none”,”all”,”std”,”file”) */ protected void setLogging(String newLogging) { logging = newLogging; synchronized(this) { if(!loggingInitialized) { System.err.println(“ForestHashtable initloggingInitialized:” + loggingInitialized); System.err.println(“ForestHashtable init logging:” +logg ...
Tìm kiếm theo từ khóa liên quan:
lập trình java phương pháp lập trình lập trình web ngôn ngữ php lập trình cơ bản XMLTài liệu liên quan:
-
Giáo trình Lập trình logic trong prolog: Phần 1
114 trang 198 0 0 -
Giáo trình Lập trình C căn bản
135 trang 173 0 0 -
Giáo trình Lập trình C căn bản: Phần 1
64 trang 170 0 0 -
Luận văn tốt nghiệp Công nghệ thông tin: Xây dựng website bán hàng nông sản
67 trang 145 0 0 -
14 trang 135 0 0
-
Tiểu luận môn Công nghệ phần mềm: Tìm hiểu công nghệ nhận diện giọng nói
27 trang 134 0 0 -
161 trang 133 1 0
-
[Thảo luận] Học PHP như thế nào khi bạn chưa biết gì về lập trình?
5 trang 133 0 0 -
Bài giảng Lập trình web nâng cao: Chương 8 - Trường ĐH Văn Hiến
36 trang 120 1 0 -
Giáo trình lập trình hướng đối tượng - Lê Thị Mỹ Hạnh ĐH Đà Nẵng
165 trang 117 0 0