Java learning log 07

xiaoxiao2021-03-06  40

November 29, 2004 -------------------------------------------- -------------------------------------------------- ------ One, configure the student management system 1.1 Tomcat startup time report, found to be web.xml problem, configure it! Web.xml All must be placed in front of must be placed first and attached: Web.xml full configuration:

login_confirm login_confirm < Servlet> studentsvlt studentsvlt teachersvlt Teachersvlt courseSvlt courseesvlt ClassSvlt ClassSvlt studentloginsvlt studentloginsvlt Marksvlt Marksvlt

login_confirm / login_confirm studentSvlt / studentsvlt

teachersvlt / teachersvlt

courseesvlt / courseesvlt

ClassSvlt / classsvlt

studentloginsvlt / studentloginsvlt

Marksvlt / marksvlt 1.2 Data Source Determine Database Can't Choose Default Database .. Here you should select the classdb database 1.3 Chinese characters to process res.setContentType ("text / html; charset = GB2312"); string input = new string (Req.getParameter ("OK"). GetBytes ("ISO-8859-1 ")); 1.4 Mom's program is too much, do not study ..

Second, JSP JavaBean example (student management system), has the value of research 2.1 add.jsp // Add student data processAdd.jsp // to handle student data, use JavaBean to call the Student class and ProcessStudent class addstudent method, if it is successful, Then jump to list.jsp, otherwise, the error mod.jsp // edit the student data interface processMod.jsp // handles student data, use JavaBean to call the Student class and ProcessStudent class Modstudent method, if the addition is successful, jump to list.jsp Otherwise, the error DEL.JSP // delete student data, call the Student class and ProcessStudent class DELSTUDENT method with JavaBean, if the addition is successful, jump to list.jsp, otherwise the error list.jsp // Displays all student data, read all Data and Paging Operation.java // Database Related Actions: such as connectivity, query, add, delete, modify. Include LoadProp (), Operation (), ResultSet Query (String SQL), Update (String SQL), Showpages (Int Currpage , int PageSize, int pagecount, string filename, CloseConn (), closeconn () method! Script.java // Database field formatted such as GET, SET method, and create a constructor student (), all variables are defined Empty. ProcessStudent.java // Test Student Data: Add, Delete, and Modify, define a Boolean variable Status, default is false, if the operation is true, the value is assigned to true, the operation fails returns false, and corresponds to the previous error. There are addstudent (), modstudent (), and DELSTUDENT () method.

PS: Thinking, if you use servlet instead of the process ???. JSP page, it is a typical JSP Servlet JavaBean example, with head ....-------------------------------------------------- -------------------------------------------------- -------------------------------------

转载请注明原文地址:https://www.9cbs.com/read-86488.html

New Post(0)