Danh mục

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    
Jamona

Hỗ trợ phí lưu trữ khi tải xuống: 10,000 VND Tải xuống file đầy đủ (50 trang) 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 ...

Tài liệu được xem nhiều: