This example is to refer to the relevant documents related to JSP on XML on some websites, combined with some individual experiences. The content involved is that the partial code of the background management end of the company's internal solution system is mainly concentrated in the management of basic information about the restaurant.
The cause of this example itself is part of my joke I am in the original company and colleagues. I also express my missing ideas for those who have worked together.
The example itself is a program of the B / S structure running under Tomcat 4.01 platform. Regarding the configuration of Tomcat, not explained here. Just explain the directory structure of the related files and folders.
Directory Structure Description: / Tomcat / WebApps / Canyin / ---- Main Directory / Tomcat / WebApps / Canyin / JSP / ----- JSP File Directory / Tomcat / WebApps / Canyin / JSP / Admin / ---- - Realize the storage of the JSP files in the background / Tomcat / WebApps / Canyin / Web-INF / CLASS / CANYIN / ------ JavaBean file storage directory / Tomcat / WebApps / Canyin / Data / ----- XML file storage directory / Tomcat / WebApps / root / ----- Tomcat boot file storage folder, only the index.html file is stored
Document brief description: /tomcat/webapps/canyin/data/Users.xml ----- Record user information / Tomcat/webapps/canyin/data/restaurants.xml ----- Record the basic information of the restaurant
/Tomcat/webapps/root/index.html ----- Home, page appears in the page, ask the user to enter your username, password
/tomcat/webapps/canyin/jsp/webapps/canyin/jsp/loginjudge.jsp ----- User identity judgment page, determine the page according to the user name and password is transferred to the background management, or the front desk client. In this example, once the user identifies that there is administrative privilege, you can enter the background management, jump to the base information management page of the restaurant, simplify the description. /Tomcat/webapps/canyin/jsp/Admin/admin_rest.jsp ----- Restaurant Basic Information Management Page, Management Restaurant Name, Phone, Address and other information
/Tomcat/webapps/canyin/web-inf/classes/canyin/eb-inf/classess/canyin/checksessionBean.class ---- Background Management Detection Sign User ID SESSION value, if not administrator, jump back to the landing page. /Tomcat/webapps/canyin/web-inf/classes/canyin/web-inf/classes/canyin/connxmlbean.class ----- Connect XML file / Tomcat/webapps/canyin/web-inf/classes/canyin/writexmlbean.class ----- Write Enter XML file
Document details and accompanying code descriptions.
/ Tomcat/webapps/canyin/data/Users.xml
Code: XML Version = "1.0" encoding = "UTF-8"?>
-
Code: