Design and implementation of JSP based on WEB online forum (source code + thesis + opening report + defense PPT + foreign language translation)

cc academy

Graduation Project (Thesis) Opening Report

Topic: JSP-based student status management system

Discipline Department: Information Engineering Department

Major: Computer Science and Technology

class:

student ID:

Name:

mentor:

Date of filling out the form: 20/20/20

  1. The basis and significance of topic selection:
    With the continuous improvement of science and technology, computer science is becoming more and more mature, and its powerful functions have been deeply understood by people. It has entered various fields of human society and is playing an increasingly important role. The student status management system is an indispensable part of an educational unit, and its content is very important to the decision-makers and managers of the school, so the student file management system should be able to provide users with sufficient information and fast query methods. However, people have always used the traditional manual method to manage files and archives. This management method has many shortcomings, such as: low efficiency, poor confidentiality, and over time, a large number of files and data will be generated, which is very important for searching, updating and maintaining. All brought a lot of difficulties.
    As a part of computer application, using computer to manage student file information has advantages that cannot be compared with manual management. For example: fast retrieval, convenient search, high reliability, large storage capacity, good confidentiality, long life, and low cost wait. These advantages can greatly improve the efficiency of student file management, and are also an important condition for the scientific and standardized management of enterprises and the integration with the world.
  2. Research status and development trends at home and abroad (including literature review):
    Management Information System (MIS) is a system for information collection, storage, processing, maintenance and use. It is formed with the development of management science and technical science. The development of MIS is closely related to the development of computer network technology. With the wide application of Internet/Intranet technology, the system structure of MIS has also undergone great changes, from the previous data access and security system based on C/S structure to The current structure system is based on B/S.
    At present, the level of student performance management in my country's colleges and universities is generally not high, and some are still based on paper media. This management method can no longer adapt to the development of the times, because it wastes a lot of manpower and material resources. In today's information age, this traditional management method must be replaced by a computer-based information management system. If this system can be adopted by the school, it will change the previous situation of manually managing students' grades, and it can establish a good school image and improve work efficiency.
    In view of the maturity of the above-mentioned management information system and the situation of collecting information, the student status management system fully uses the overall idea of ​​MIS, comprehensively applies B/S mode, SQL Server, JSP and other technologies, and has the ability for students to operate on the information they need. The functions such as managing the system with the administrator can well integrate the display, collection, and statistics of book exchange information, and truly serve the teaching plan in good condition.
  3. Research content of this project The
    research content of this project is the student status management system, and the grade management system provides a powerful student grade management function, which is convenient for the administrator to add, modify, delete, query and other operations on student grades and other information. The overall task of this system development is to realize the systematization, standardization and automation of student performance management, and to achieve the purpose of improving the efficiency of student performance management.
    The system comprehensively applies B/S mode, SQL Server, JSP and other technologies
    (1) B/S structure, that is, Browser/Server (browser/server) structure, is an extension of C/S structure with the rise of Internet technology. a modified or improved structure. Under this structure, the user interface is completely implemented through the browser, part of the business logic is implemented on the front end, but the main business logic is implemented on the server side, forming a so-called three-tier structure. The B/S structure uses the increasingly mature and popular browser technology to realize powerful functions that originally required complex special software, and saves development costs. It is a brand-new software system construction technology. This structure has become the preferred architecture of today's application software.
    (2) SQL Server is a client/server relational database management system. It uses transactional SQL to transfer requests between the client and the SQL server.
    (3) JSP is a web page technology that realizes mixed coding of ordinary static HTML and dynamic HTML. It has the advantages of cross-platform, high operating efficiency, and easy to use.
    When using JSP for WEB development, it is necessary to use an application server for resource sharing, network communication, etc. for distributed applications. Among the application servers supporting JSP, Tomcat, Web Logic, and Web Sphere are widely used in China. Among them, Tomcat is a sub-project of Apache-Jakarta. It is an open source container that supports JSP and Servlet technology for free, and it is also a WEB server software.
    JDBC is formulated by SUN Corporation, which defines the programming interface between Java and various SQL databases. JDBC API is a unified standard application programming interface. JDBC is very similar to ODBC (Open Data Base Connectivity, Open Database Connection), which acts as a bridge between applications and databases. There are four drivers for JDBC: JDBC-ODBC Bridge, JDBC Native Bridge, JDBC-Network Bridge, and Pure Java JDBC Drive.
    This system will use Tomcat as the server and use JDBC-ODBC to connect to the database.
    The student status management system consists of two parts: the information management statistics part and the student update information part. The former is mainly used by system administrators and operators, while the latter is mainly for student users. The main contents of the system are as follows:
    (1) User login and user authority settings.
    (2) Users' inquiries about their own personal information and the administrator's management of everyone's personal information.
  4. The research plan of this topic
    The student performance management system mainly provides convenient and efficient management functions and an online information query platform. Students can check relevant information through the system, and administrators can manage all information. The system uses JSP programming language, Microsoft SQL2000 database and Apache Tomcat as the development platform, and uses software engineering thinking methods to develop the system quickly and effectively. For this system, we need to implement the following basic functions: (1) Student query function:
    for It is convenient for students to find information such as grades, and classify all information according to their needs. In this way, students can easily find the information they need.
    (2) Added function: administrators can enter relevant information such as student grades by filling out forms. The system can automatically avoid duplication of information.
    (3) Modification function: administrators can modify the information in the database. The system can find out the information to be modified through the conditions given by the administrator, save the modified information, and automatically find whether it is duplicate information.
    (4) Delete function: the administrator can delete the data. The system can find out the information to be deleted through the conditions given by the administrator, and prompts whether to confirm the deletion. If the deletion is confirmed, the relevant information will be deleted from the database.
    (5) Administrator query function: administrators can select and query all information through conditions and sort them.
    Based on the running platform of Apache Tomcat framework, the system uses Dreamweaver to design the overall framework, connect to the database, and finally complete the overall system debugging.
  5. Research objectives, main features and work progress:

Research objectives:

(1) Establish a student status management system with a B/S layer structure to realize the computer management of the administrator's acquisition of student information, statistics and other links.

(2) Track and record students' original academic performance and academic year comments.

(3) Inquire about the basic situation and changes of students, the distribution of student sources, the ratio of male and female students, etc. statistics.

(4) Using the same exam in different grades in the same session or different exams in different grades as a normative reference, scientifically analyze and evaluate students' academic performance with effective scores and standard scores.

(5) Use the computer to analyze the distribution frequency curve of the test scores to understand the overall situation of the students' scores in the school, and provide the basis for decision-making and research for the education administrative department and the teaching and research department.

main feature:

(1) The system is divided into two parts: student user operation and administrator operation. Students' personal information can be managed by administrators.

(2) Friendly interface, easy to use.

(3) The system is simple to operate, powerful and easy to maintain.

Progress plan:

serial number Work content at each stage Start date Remark
1 Look up information and write the opening report 2007/3/5-3/19
2 System analysis and database design, determine the functional modules 3/20-4/1 Including the collection and summary of thesis materials
3 System specific design 4/2-4/11 Including the collection and summary of thesis materials
4 main program design 4/12-4/30 Including the collection and summary of thesis materials
5 System testing, writing the first draft of the paper 5/1-5/7 Including the collection and summary of thesis materials
6 perfect system 5/8-5/13 Including the collection, induction and revision of thesis materials to improve the system
7 Complete the dissertation 5/14-5/20 Under the guidance of the instructor, revise and improve the thesis
8 defense preparation 5/21-5/25

6. References:

[1] Wu Shili, Wang Xiaoyi, "JSP Network System Development", Beijing: Electronics Industry Press

[2] Shi Zhiguo, Dong Jie, Xue Weimin "JSP Application Tutorial" Beijing: Tsinghua University Press

[3] Ding Baokang, Dong Jianjian "Database Practical Course" Beijing: Tsinghua University Press

[4] Zhu Junyan WEB development technology [M] 2006.6

[5] Cen Ling's Office Automation System Based on Browser/Server Structure [M]. Computer and Modernization 2001.2

Realization of BBS Based on JSP

Major: Computer Science and Technology Student ID: 7000803008 Student Name: Liang Chichang Instructor: Hu Jun

Summary

Today's society is a society with rapidly developed information, in which the Internet occupies a very important position in the exchange of information. People can receive the latest news on the Internet, and can also exchange information through the Internet. The forum is one of the channels for everyone to exchange information.

The concept of forum: Forum (BBS) is the abbreviation of Bulletin-Board-System, that is, electronic bulletin board. It is an open information service system on the Internet, through which forum users can conveniently realize information exchange and file sharing.

This paper mainly completes the design and implementation of an information exchange forum based on JSP technology, and mainly realizes the dynamic interaction between the client and the server. The system consists of six modules: forum user login and registration module, forum account information module, forum article publishing module, announcement/system module, board management module, and information management module. The paper describes the structure, function and specific design process of the module in detail. The system adopts JSP technology, JavaBeans component technology and JDBC technology.

Keywords: JSP, BBS, MYSQL, JavaBeans, system design

Bulletin-Board-System realization based on JSP

Abstract

Nowadays is a flourishing society that information travels fast. Among the exchanges of information, the Internet occupies a very important position, through which people can receive the latest news, and can exchange with each other as well. And the forum is an outlet for everyone to exchange information, which can also make the exchange of information convenient.

The concept of the forum: The forum (BBS) is the abbreviation of the Bulletin- Board- System, namely the column of the electronics announcement. It is a service system that is open on Internet, through which, the forum customer can conveniently realizes the commutation of the information and the share of the documents.

In this text, it mainly completed the design and realizations of information exchanges forum based on the JSP technique. And it main carry out a dynamic state between the customer and the server. There are six molds piece: The forum customer debarkation registers the mold piece, the forum bank account information mold piece, the forum article releases the mold piece, announce/ the system mold piece, a management mold piece, information management mold piece. The thesis has described module structure、function detailed and has designed process concretely. System has adopted the JSP technology and the JavaBeans module technology and the JDBC technology have come true.

KeyWord: JSP, BBS, MYSQL, JavaBeans, System design

Table of contents

Summary I

Abstract II

Introduction 1

Chapter 1 System Overview 2

1.1 Design goal 2

1.2 Research Method 2

1.3 Technologies involved in the project 2

1.3.1 JSP technology 2

1.3.2 JavaBeans Technology 3

1.3.3 JDBC technology 3

1.4 Equipment requirements 4

Chapter 2 Demand Analysis 5

2.1 Requirements specification 5

2.1.1 System Composition 5

2.1.2 Functional requirements 5

2.1.3 Non-functional requirements 7

2.2 Selection of development environment 7

Chapter 3 Outline Design 8

3.1 Overall Design 8

3.2 Relationship between system structure and program 10

3.3 Operating mode 10

3.4 Interface design 10

3.4.1 User interface 10

3.4.2 External Interface 10

3.4.3 Internal interface 11

3.5 Data structure design 11

3.5.1 System ER Diagram 11

3.5.2 Key points of logical structure design 11

3.5.3 Key Points of Physical Structure Design 13

3.5.4 The relationship between data structures and programs 13

3.6 Functional module design 16

3.6.1 Overall Design 16

3.6.2 Functional module design 16

3.7 System fault handling design 18

3.7.1 Error message 18

3.7.2 Remedial measures 19

3.7.3 System Maintenance Design 19

Chapter 4 Detailed Design 20

4.1 User registration and login module 20

4.1.1 Function Description 20

4.1.2 Function realization 20

4.1.3 Screenshot of program running process 23

4.2 Account information module 24

4.2.1 Function Description 24

4.2.2 Function realization 25

4.2.3 Screenshot of program running process 28

4.3 Article Publishing Module 28

4.3.1 Function Description 28

4.3.2 Function realization 28

4.3.3 Screenshot of program running process 29

4.4 Announcement System Module 29

4.4.1 Function Description 29

4.4.2 Function realization 29

4.4.3 Screenshot of program running process 31

4.5 Section Management Module 31

4.5.1 Function Description 31

4.5.2 Function realization 31

4.5.3 Screenshot of program running process 33

4.6 Information Management Module 34

4.6.1 Function Description 34

4.6.2 Function realization 34

4.6.3 Screenshot of program running process 36

Chapter 5 Conclusion 37

References38

Thanks 39

introduction

With the deepening of the Internet in social life, BBS development technology has developed so far, from CGI, ASP, to PHP has become more mature, and the functions are more abundant, but with the advantage of "write once, run everywhere" realized by Sun's Java technology , the JSP technology that inherits this mantle has attracted more and more people's attention. As a display window to the outside world, BBS has become a widespread demand for the public for internal and external information exchange. In order to communicate better, users want to have timely and professional exchanges with other users about their majors and hobbies, so there are forums, so that we can communicate conveniently in the virtual space of the Internet. Publishing information on the Internet is mainly realized through the website, and obtaining information is to search the required information in the website forum and the Internet "ocean" according to a certain retrieval method. Therefore, the status of forum construction in Internet applications is obvious. It has become an important part of modern communication and information acquisition, and thus has attracted much attention. Now every university website has a BBS forum. On the BBS, students and teachers can easily communicate with each other. Where there is a network, all kinds of people from different regions and countries can join the BBS. communicate on. This also saves a lot of educational resources and makes full use of educational resources.

Java is the mainstream development technology in the future and has many advantages. JSP is an important application technology of Java on the Internet/Intranet Web, and has been widely supported and recognized. It can be perfectly combined with various Java technologies to achieve very complex applications. This website is developed on the WEB system using JSP + JavaBeans and background database MYSQL to create a more stable, efficient and secure operating environment.

This article mainly discusses the design and implementation of a JSP forum based on B/S mode, the main function is to realize the dynamic interaction between the client and server. There are six modules: forum user login and registration module, forum account information module, forum article publishing module, announcement/system module, board management module, and information management module. The basic functions of the forum are realized, and the realization of specific functions utilizes JavaBeans component technology.

Chapter 1 System Overview

1.1 Design goals

BBS is an essential tool for people-to-people interaction on the Internet, especially for websites. In the past, we have always used the form of guestbooks, but with the scale of your website, more and more urgently need a platform that is easy to maintain and communicate, and then use BBS. BBS can be accessed through a WEB browser, and realizes many functions such as online communication. Netizens gradually began to accept this system, which is easy to use and has increasingly powerful functions. On it, netizens can post and publish various information and discuss various topics. With the popularity of the Internet in China and the substantial price reduction of computers and their peripherals, the concept of the Internet has gradually become popular. The number of Chinese netizens is increasing exponentially, and the popularity of BBS is also catching up with Email. Almost every website has its own BBS or BBS link. The services provided by the BBS community to users are comprehensive and very friendly. Users can set different display styles according to their preferences in the community and customize various services according to their needs. .

1.2 Research Methods

This virtual community is developed using JSP + JavaBeans + MYSQL. Operating platform: JDK 1.5 + Tomcat5.5 + MYSQL + Windows XP.

Using modular thinking, it is divided into 3 layers:

a. Data storage layer: use MYSQL to store all data of BBS, including user information, article data, user information, system data, key issues, and database planning.

b. System function layer: complete the basic functions of BBS, composed of multiple parallel modules, call down the MYSQL data to access the database, accept processing requests upward, return the processing results to the upper layer, and return success or failure results and other data according to the request type . Moreover, the module is highly flexible and can be modified and added conveniently.

c. Service layer: Talk to the client directly, call the function module to obtain data according to the request of the client, and then send the data back to the client, develop different service modules according to the type of the client, and abstract as reasonably as possible, Make it possible for different service layers to share the modules of the system function layer.

1.3 Technologies involved in the project

1.3.1 JSP technology

JSP (Java Server Pages) is a dynamic web technology standard initiated by Sun Microsystems and established by many companies. JSP technology uses the JAVA language as the scripting language, and the JSP web page provides an interface for the entire server-side JAVA library unit to serve HTTP applications.

Adding Java program fragments (Scriptlet) and JSP tags (tag) to traditional web page HTML files (*.htm, *.html) constitutes a JSP web page (*.jsp). When the web server encounters a request to access a JSP web page, it first executes the program fragments in it, and then returns the execution result to the client in HTML format. Program fragments can manipulate databases, redirect web pages, send emails, etc., which are the functions needed to build dynamic websites. All program operations are executed on the server side, and only the results are sent to the client on the network. The requirements for the client's browser are the lowest, and no Plugin, ActiveX, Java Applet, or even Frame can be realized.

1.3.2 JavaBeans technology

What are JavaBeans? JavaBeans is Java's reusable component technology. Originally, the purpose of JavaBeans was to package software code that could be reused. In particular, it is used to help manufacturers develop java software components used under the integrated development environment (IDE). These include controls such as the Grid, which users can drag and drop into the development environment. Since then, JavaBeans can be extended as a standard component of a java web application, and the JavaBeans component framework has been extended to an enterprise version of Bean (EJB). JavaBeans is a software component model that describes JAVA, which is somewhat similar to Microsoft's COM component concept. In the JAVA model, the functions of the JAVA program can be infinitely expanded through JavaBeans, and new application programs can be quickly generated through the combination of JavaBeans. For programmers, the best thing is that JavaBeans can realize code reuse, and it is also of great significance to the ease of program maintenance and so on. ASP uses COM to expand complex functions, such as file uploading, sending emails, and separating business processing or complex calculations into independent and reusable modules. JSP achieves the same functional expansion through JavaBeans. JSP provides perfect support for integrating JavaBeans components in Web applications. This support not only shortens development time (you can directly use tested and trusted existing components, avoiding repeated development), but also brings more scalability to JSP applications. JavaBeans components can be used to perform complex computing tasks, or be responsible for interaction with the database and data extraction. In the actual JSP development process, readers will find that compared with traditional ASP or PHP pages, JSP pages will be very concise. Because JavaBeans is easy to develop and can take advantage of the powerful functions of the Java language, many dynamic pages The processing process is actually encapsulated into JavaBeans.

1.3.3 JDBC technology

JDBC is a Java API (Application Programming Interface, Application Programming Interface) that can be used to execute SQL statements. It consists of some classes and interfaces written in Java language. JDBC provides a standard application programming interface for database application developers and database front-end tool developers, enabling developers to write complete database application programs in pure Java language.

Being robust, secure, easy to use, easy to understand, and automatically downloaded from the web, Java is an excellent language for writing database applications. All that's needed is a way for the Java application to talk to a variety of different databases. JDBC is the mechanism for this purpose.

By using JDBC, developers can easily send SQL statements to almost any kind of database. In other words, developers don't have to write a program to access Sybase, another program to access Oracle, and another program to access Microsoft's SQL Server. Programs written in JDBC can automatically send SQL statements to the corresponding database management system (DBMS). Not only that, but applications written in Java can run on any platform that supports Java, so you don't have to write different applications on different platforms. The combination of Java and JDBC allows developers to truly realize "Write Once, Run Everywhere!" when developing database applications

JDBC extends the capabilities of Java. For example, with the Java and JDBC APIs it is possible to publish a web page containing an applet that uses information that may come from a remote database. Enterprises can also use JDBC to connect all employees to one or more internal databases through the intranet (even if the computers used by these employees have various operating systems such as Windows, Macintosh, and UNIX). As more and more programmers start using the Java programming language, the demand for easy access to databases from Java is also increasing.

1.4 Equipment requirements

Host type:

Server (IBM compatible) minimum configuration

CPU:P3-850MHz;

Memory: 256MB

Hard disk: 20GB

Network card: 10/100MB adaptive

Client (IBM compatible) minimum configuration

CPU:P3-450MHz;

Memory: 128MB

Hard disk: 10GB

Network card: 10/100MB adaptive

Chapter 2 Demand Analysis

2.1 Requirements specification

2.1.1 System Composition

The system can be divided into the following functional modules:

  1. Forum user login registration module: including user login, exit, registration and other functions.
  2. Forum account information module: After the user logs in to the system, in the personal center, he can modify the personal data through the link of modifying the personal data (the user ID is not allowed to be modified), and view and modify the articles published by himself through my topic.
    3. Forum Article Publishing Module: After logging in to the system, users can view articles sent by all other users, publish their own topics, and reply to other users and topics published by themselves.
    4. Announcement/system module: forum administrators can publish forum announcements, today's topics and other functions through the background management system. In the forum system, you can set the score for article operations, the number of posts, and the essence of posts.
    5. Forum management module: forum administrators can control the forum's forum through the background management system, and administrators can complete the following functions: appoint bosses , modify forums and other operations.
    6. Information management module. Community information configuration; add administrator; edit administrator; set level; configure permissions; re-login; safe exit; user level.
    The above functions complete the configuration of the entire forum, and the management of users and administrators can be completed through the corresponding links.
    The following is the functional module diagram of the BBS system software:
    BBS software system

    registration login
    account information
    article publishing
    announcement system
    section management
    information management
    Figure 2.1 Functional module diagram of BBS system software
    2.1.2 Functional requirements
    1. User registration and login module
    Table 2-1 User registration and login module
Module name: User registration and login Module ID: A1
The operations that may be involved are as follows: User login: administrators and users can log in to the system according to their user names and passwords. User Registration: Users can independently register a forum account. Modify data: Administrators can correct wrong data, such as user information, etc. User logout: When the user logs out, it becomes a guest authority and can only browse posts.

2. Account information module
Table 2-2 Account information module

Module Name: Account Information Module ID: A2
This module mainly operates on user information and published articles in the personal center. The operations that may be involved include the following: adding, deleting, and modifying personal information. View, modify or delete articles and messages published by this user. Change photos, modify signatures, and preview signatures.
  1. Article Publishing Module

Table 2-3 Article publishing module

Module Name: Article Publishing Module ID: A3
This module mainly completes various user-oriented functions of the entire BBS system. The operations that may be involved are as follows: 1 Posting forum topics: Users can post forum topics through this function, which is often called posting. 2 Reply topic: Users can reply to any existing topic, and can add their own personalized signature at the same time.

4. Announcement/system module

Table 2-4 Announcement/system module

Module Name: Announcements/Regulations Module identification: A4
Forum administrators (webmasters) can appoint moderators through background management and have the highest authority. Banzhu can only publish forum announcements and latest topics in his own forum, and he can pin, delete, lock and other operations on the post.

5. Block Management Module

Table 2-5 Block management module

Module Name: Block Management Module Module identification: A5
Forum administrators can control forum boards through the background management system, and administrators can complete the following functions: appoint bosses, modify boards, and other operations.

6. Information management module

Table 2-6 Information management module

Module Name: Information Management Module identification: A6
The information management module mainly completes the following functions: community information configuration; adding administrators; editing administrators; setting levels; changing permissions; member management; security exit; user levels.

2.1.3 Non-functional requirements

The system has a friendly interface, is easy to use, and runs stably. It is a typical BBS system.

2.2 Selection of development environment

System Requirements Analysis Phase: Microsoft Windows XP

System code development stage: Windows XP+ JDK1.5 + tomcat5.5 +MYSQL.

System GUI/LOGO auxiliary design tools: Photoshop8.0, Dreamware8.0.

Chapter 3 Outline Design

3.1 Overall Design

We adopt a three-layer application model based on B/S structure to realize the BBS system. The Browser/Server computing method is a two-layer structure system. As technology advances and requirements change, more levels are divided. At present, in the Internet application architecture, transaction processing is divided into three layers, namely: Web Browser—Internet Server—Database Server. In this architecture, business expression is realized through a simple Web Browser. Users submit forms through the Web Browser and transmit information to the Internet Server. The database server executes, and the Database Server feeds back the result of the query to the Internet Server, and the Internet Server feeds back to the Web Browser in standard HTML language.

Compared with the traditional C/S (Client/Server) model, the three-tier application model improves the scalability, security and reusability of the system. It separates the application logic from the user interface and data access, so that the maintenance of the system is simplified, and at the same time, the burden on the database server can be reduced by using component technology, thereby improving performance.

Typical C/S computing features:

  1. The server is responsible for data management and program processing;
  2. The client is responsible for interface description and section display;
  3. The client makes a processing request to the server;
  4. After the server responds, the processing result is returned to the client;
  5. Network data transfer is small.
    After analysis, the B/S structure is suitable for this system, and it has the following advantages:
    1. The standard on which B/S technology is based is open and non-proprietary, and is designated by a standardization organization rather than formulated by a single manufacturer.
    2. The cost of B/S technology is low, and generally only needs to be installed and configured on the server. There is less work on the client, so down.

Lower development and management costs. However, C/S applications need to be implemented on all clients, whether they are installed, equipped or upgraded.

B/S technical maintenance work is mainly concentrated on the server side, and the maintenance workload of the client side is very small. In the C/S structure, the maintenance workload of the client and the server is relatively large. Web Browser technology is simple and easy to use. Once users master the usage of Web Browser, they also have the key to use various information resources on the system.

This virtual community is a set of network virtual community system developed by using JSP + JavaBean + MYSQL. Discuss various interesting topics such as computer software, hardware, Internet, multimedia, and programming with others through the BBS system.

Figure 3.1 Network structure diagram

Figure 3.2 System structure diagram

3.2 Relationship between system structure and program

Table 3-1  The distribution relationship between the realization of each functional requirement module and each block program

3.3 Operation mode

functional module related procedures
Register; Login reg.jsp;login.jsp;online.jsp;shutdown.jsp;pcmain.jsp
account information first.jsp;modify.jsp;repassword.jsp;modifype.jsp;showpenname
Article published send.jsp;reply.jsp;display.jsp
Announcement system actboardset.jsp;inform.jsp
Section management adminmast.jsp;changeroot.jsp;addmast.jsp
information management madmin.jsp;mdel.jsp;medit.jsp;msend.jsp;mshow.jsp

Figure 3.3 The running sequence of each module of the system

3.4 Interface design

3.4.1 User interface

This system is written in standard HTML, with JavaScript and CSS applied internally, and the style is unified. Users can complete all input work through a form. This module does not involve large pictures, audio and video, etc., so that it can ensure the accuracy of the output. Rapidity. Users can view and fill in data intuitively, simplify operations as much as possible, and its main interface is simple and easy to use.

3.4.2 External interface

The database connection of the system mainly adopts the JDBC method, which is simple and avoids excessive configuration, and the database access is all completed by the operating system. The interface of the database is realized by JavaBean connection. Use MYSQL to store all data of BBS, including user information, article data, user information, system data, etc.

3.4.3 Internal interface

JavaBean completes the connection between the Jsp program and the database; facilitates the reading and writing of the database, improves reuse, and reduces the amount of code.

3.5 Data structure design

3.5.1 System ER Diagram

According to the UML system model, various entities in the system and the relationships among them can be determined. The entities of this system include administrator data entity (Numb1), user data entity (User), post data entity (btable), etc.

M

browse

browse

post

user

1

M

manage

manage

N

administrator

1

1

Figure 3.4 System ER Diagram

3.5.2 Key Points of Logical Structure Design

database table structure

1. board table

Table 3-2  Board table

field type length allow empty
Id Int 11
Btable varchar 20
Name Varchar 30
Logo Varchar 100 yes
Inform Varchar 160 yes
Focus Varchar 200 yes
Boardmast Varchar 255

2. Numb1 table

Table 3-3  Numb1 table

field type length allow empty
Userid Varchar 20
Pw Varchar 20
Mail Varchar 40 yes
Tim Datetime

3. Onlcount table

Table 3-4  Onlcount table

field type length allow empty
Id Int 11
Page Varchar 80
Time Varchar 10
Userid Varchar 20
Username Varchar 20
Ip Varchar 15

4. Online table

Table 3-5  Online table

field type length allow empty
Userid Varchar 20
Ontims Int 11 yes
Txt Int 11 yes
Point Int 10 yes
Penname1 Varchar 250 yes
Penname2 Varchar 250 yes

5. btable table

Table 3-6  btable table

field type length allow empty
Id Int 11
super Int 11
Boardid Int 11
title Varchar 40
Txt Text
Userid Varchar 20
Username Varchar 20
Time Datetime
ip Datetime
editing Varchar 250 yes

6. User table

Table 3-7  User table

field type length allow empty
userid Varchar 20
Step Int 11
Root Varchar 75
Question Varchar 30 yes
Answer Varchar 30 yes
Face Varchar 50
Name Varchar 20
Sex Varchar 5 yes
Mail Varchar 5 yes
Qq Varchar 15 yes
Tel Varchar 15 yes
Job Varchar 20 yes

3.5.3物理结构设计要点

系统数据库采用MYSQL。今天的商业环境要求不同类型的数据库解决方案。性能、可伸缩性及可靠性是基本要求,MYSQL 给数据管理与分析带来了灵活性。从数据管理和分析角度看,MYSQL可以作为一个完备的数据库和数据分析包。作为重要的基准测试可伸缩性和速度奖的记录保持者,MYSQL 是一个具备完全功能支持的数据库产品,提供了对可扩展标记语言 (XML) 的核心支持以及在 Internet 上和防火墙外进行查询的能力。

3.5.4数据结构与程序的关系

服务器端程序采用JDBC来访问数据库:

----------------------------------------------------------------------------------------------------------------

Class.forName("com.mysql.jdbc.Driver");

Connection con = DriverManager.getConnection("jdbc:mysql://"+"localhost"+"/"+numb1,"root","");

----------------------------------------------------------------------------------------------------------------

上面两条Java语句完成数据库的连接,而下面几条语句则完成最基本的信息数据查询操作。

----------------------------------------------------------------------------------------------------------------

package numb1.com;

import java.lang.*;

import java.sql.*;

public class db{

private Connection con;

private Statement st;

private ResultSet rs;

private String host="localhost";

private String user="root";

private String pw="";

private String db="numb1";

private String Dri="com.mysql.jdbc.Driver";

private String url="jdbc:mysql://"+host+"/"+db;

public String getStr(String s){

String str=s;

try{

byte b[]=str.getBytes("ISO-8859-1");

str=new String(b);

return str;

}

catch(Exception e){return null;}

}

public String gb2iso(String qs){

try{

if (qs == null) return "NULL";

else return new String(qs.getBytes("gb2312"),"iso-8859-1");

}

catch(Exception e){

System.out.print("gb2iso error:"+e.getMessage());

}

return "NULL";

}

public void close(){//关闭连接

try{

if(rs!=null)rs.close();

}catch(Exception e){

System.out.print("rs"+e.getMessage());

}

try{

if(st!=null)st.close();

}catch(Exception e){

System.out.print("st"+e.getMessage());

}

try{

if(con!=null)con.close();

}catch(Exception e){

System.out.print("con"+e.getMessage());

}

}

public ResultSet query(String sql)throws Exception{

try{

Class.forName(Dri).newInstance();

con=DriverManager.getConnection(url,user,pw);

st=con.createStatement();

rs=st.executeQuery(sql);

return rs;

}catch(SQLException e){

System.out.print(e.getMessage());

return null;

}

}

public void update(String sql)throws Exception{

try{

Class.forName(Dri).newInstance();

con=DriverManager.getConnection(url,user,pw);

st=con.createStatement();

st.executeUpdate(sql);

st.close();

con.close();

}catch(SQLException e){

System.out.print(e.getMessage());

}

}

}

通过上面的Java语句,服务器端就完成了对数据库的连接,并且实现了对数据库的查询、更新等操作。

---------------------------------------------------------------------------

3.6功能模块设计

3.6.1总体设计

BBS系统总体上分6个模块,模块之间相互连接,互相作用,从用户的注册,登陆退出到发表文章,回复文章,对BBS系统的管理都可以通过简单的操作来完成。论坛系统设计简洁明了,没有过多的附属功能。

3.6.2功能模块设计

  1. 用户注册登陆模块

要完成论坛的各项操作,用户必须登陆论坛系统,如果没有论坛帐户,用户注册是必须的。用户命令如果是退出,则清除用户的状态信息,并返回BBS 首页,如果是登录则使用JDBC连接数据库,取得用户输入的帐号和密码并查询数据库,将得出的结果和用户输入的信息做比较,验证正确,显示用户已经登陆到系统,错误将返回消息让用户从新输入。如果用户想注册帐户,则返回注册页面,用户填写信息后,将检测信息的正确性,如果帐号允许注册,则完成帐号的注册,将信息写入到数据库中,如果帐户已经存在,则返回错误信息,告诉用户帐号存在,请用户从新输入,并完成注册,进程结束。

图3.5 用户注册登陆模块

(2)帐户信息模块

当用户登陆系统后,在个人中心中,可以通过修改资料的链接来修改个人资料(其中帐户名是不允许修改的),通过我的话题来查看和修改自己发布的文章。

图3.6 帐户信息模块

(3) 文章发布模块

用户登陆系统后可以查看其他所有用户发的文章,并可以发布自己的话题,也可响应回复其他用户和自己发表的话题。

图3.7 文章发布模块

(4) 公告制度模块

论坛管理员可以通过后台管理系统发布论坛公告,今日话题,并可以设置版面图标。

(5) 版块管理模块

论坛管理员可以通过后台管理系统控制论坛的版块,管理员可以完成下列功能:添加分类或版面,版面配置或删除;并可以对已存在的版块设置属性。

(6) 信息管理模块

信息管理模块主要完成下面的功能。信息配置;添加管理员; 编辑管理员;设定等级;配置权限;重新登录;安全退出;用户等级;用户列表。

以上的功能完成了整个论坛的配置,用户的管理,管理员的管理都可以通过对应的链接来完成。

3.7系统故障处理设计

3.7.1出错信息

3-8出错或故障情况一览表

错误类型 错误代号 异常类型 输出信息 处理方法
1 用户帐号不存在 ERR_01 NULL 无此帐号 请用户注册
2 用户密码错误 ERR_02 Check Error 密码错误 重新输入
3 数据库连接错误 ERR_03 Connect 无法连接数据库 告诉用户错误。
4 数据库查询错误 ERR_04 Select 查询数据库出错 请客户稍后重试
5 数据库查询错误 ERR_04 Insert(创建帐号) 无法创建帐户 请客户稍后重试
6 数据库查询错误 ERR_04 Delete(删除好友) 无法删除好友 请客户稍后重试
7 数据库查询错误 ERR_04 Updata(更新数据) 无法更新数据库 请客户稍后重试
8 用户没有权限 ERR_05 Permissions(权限) 用户没有权限 告知用户

3.7.2补救措施

当出现帐号,密码等通常的错误时,用户可以重新输入信息,即可解决,或是重新启动客户端,当出现无法连接数据库或者是查询中的错误,通常系统管理员重新启动服务即可解决,由于数据库的连接错误是全局的,所以重新启动服务是最佳的操作。

3.7.3系统维护设计

用于系统的检查与维护的检测点和专用模块,在这个版本中没有出,将会在后续开发中增加,例如自动重新启动服务,自动纠正数据的错误。以及用户数据的安装问题,密码的加密问题。

第四章 详细设计

4.1用户注册登陆模块

4.1.1功能说明

要完成论坛的各项操作,用户必须登陆论坛系统,如果没有论坛帐户,用户注册是必须的。用户命令如果是退出,则清除用户的状态信息,并返回BBS 首页,如果是登录则使用JDBC连接数据库,取得用户输入的帐号和密码并查询数据库,将得出的结果和用户输入的信息做比较,验证正确,显示用户已经登陆到系统,错误将返回消息让用户从新输入。如果用户想注册帐户,则返回注册页面,用户填写信息后,将检测信息的正确性,如果帐号允许注册,则完成帐号的注册,将信息写如到数据库中,如果帐户已经存在,则返回错误信息,告诉用户帐号存在,请用户从新输入,并完成注册,进程结束。

4.1.2功能实现

----------------------------------------------------------------------------------------------------------------

登陆页面:login.jsp

部分代码:

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>

<jsp:useBean id="con" scope="page" class="numb1.com.db"/>

<jsp:useBean id="ht" scope="page" class="numb1.com.Dohtml"/>

<jsp:useBean id="onLine" scope="application" class="numb1.com.onLine"/>

<%@ include file = "include/config.jsp" %>

<%

String p=request.getParameter("page");p=ht.donull(p);

String bdid=request.getParameter("bdid");bdid=ht.donull(bdid);

String bbsid=request.getParameter("bbsid");bbsid=ht.donull(bbsid);

String name="";

String root="";

String sendredir="first.jsp";

String sql;

ResultSet rs;

if(p.indexOf("display")!=-1){

sendredir=p+".jsp?bdid="+bdid+"&bbsid="+bbsid;

}else if(p.indexOf("main")!=-1){

sendredir=p+".jsp?id="+bdid;

}

%>

<%

String id=(String)request.getParameter("id");id=ht.donull(id);

String mm=(String)request.getParameter("pw");mm=ht.donull(mm);

boolean test;

if(id.compareTo("")!=0 && mm.compareTo("")!=0){

if(online_enable == "on"){

test=onLine.Login(id,request.getRemoteAddr());

}else{

test=true;

}

if(test){

sql="select*from numb1 where userid='"+id+"' and pw='"+mm+"'";

rs=con.query(sql);rs.next();if(rs.getRow()!=0){

session.setAttribute("id",id);

sql="select step, name from user where userid='"+id+"'";

rs=con.query(sql);rs.next();

if(rs.getRow()!=0){

root=rs.getString(1);

name=con.getStr(rs.getString(2));

session.setAttribute("root",root);

session.setAttribute("name",name);

}

sql="select ontims from online where userid='"+id+"'";

rs=con.query(sql);rs.next();

int count=rs.getInt(1)+1;

String ip=request.getRemoteAddr();

sql="update online set ontims="+count+",lastip='"+ip+"',lastim=now() where userid='"+id+"'";

con.update(sql);

response.sendRedirect(sendredir);

上面代码实现用户登陆界面,对用户信息进行验证,如果用户名和密码没有错误,则进入论坛系统,可以拥有注册用户所有的权限。否则提示错误信息。

----------------------------------------------------------------------------------------------------------------

注册页面reg.jsp

部分代码:

<script language="JavaScript" type="text/JavaScript">

function check_form(theform)

{

if (theform.id.value.length<4)

{

alert("对不起,您的ID长度不够!");

theform.id.focus();

return false;

}

if (theform.mm1.value.length<4)

{

alert("对不起,您的密码长度不够!");

theform.id.focus();

return false;

}

if (theform.mm1.value==""||theform.mm2.value==""||theform.mm1.value!=theform.mm2.value)

{

alert("您输入密码的方式不正确,请确认后正确输入!");

theform.mm1.focus();

return false;

}

if (theform.mail.value=="")

{

alert("请输入您的E-mail,以便您的密码遗失后取回密码!");

theform.mail.focus();

return false;

}

if (theform.mail.value.indexOf('@') == -1||

theform.mail.value.indexOf('.') == -1||

theform.mail.value.charAt(0)==".")

{

alert("Email地址格式不正确!");

theform.mail.focus();

return false;

}//value

if (theform.name.value=="")

{

alert("请输入您的昵称!");

theform.name.focus();

return false;

}

}

function KeyFilter(){

if (!((event.keyCode>96 && event.keyCode<123)||(event.keyCode>47 && event.keyCode<58)||(event.keyCode=95)))

return false;

}

</script>

上面代码实现对用户信息的验证,提示新用户需要注意的问题,那些选项是必须填写的,那些是可选的,并过滤一些非法字符,使注册功能更完善。

----------------------------------------------------------------------------------------------------------------

4.1.3程序运行过程截图

用户登陆页面login.jsp

图4.1 用户登陆页面

用户注册页面reg.jsp

图4.2 用户注册页面

4.2帐户信息模块

4.2.1功能说明

当用户登陆系统后,在个人中心,可以通过修改资料的链接来修改个人资料(其中帐户名是不允许修改的),通过我的主题来查看和修改自己发布的文章。

4.2.2功能实现

----------------------------------------------------------------------------------------------------------------

主题显示:pcmain.jsp

部分代码:

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>

<jsp:useBean id="con" scope="page" class="numb1.com.db"/>

<jsp:useBean id="ht" scope="page" class="numb1.com.Dohtml"/>

<jsp:useBean id="onLine" scope="application" class="numb1.com.onLine"/>

<%@ include file = "include/config.jsp" %>

<%

String id=(String)session.getAttribute("id");id=ht.donull(id);

String root=(String)session.getAttribute("root");root=ht.donull(root);

String name=(String)session.getAttribute("name");name=ht.donull(name);

String bdid=request.getParameter("id");

String stringpage=request.getParameter("page");//stringpage为未处理的字符串型的页码数

String table="";

String bdname="";

String logo="";

String information="";

String focus="";

String main="main.jsp";

String display="display.jsp";

String reer="";

String sql;

int retimes,readtimes;

int x=0;//计数器

int count=0;

int showrow=36;//每页显示条数

int pages=1;//当前页数

int startrow; //本页开始条数

int allcount=0;

//本页文件名

String f_name=request.getRequestURI().substring(request.getRequestURI().lastIndexOf("/")+1,request.getRequestURI().lastIndexOf("."));

if(root.compareTo("")==0){root="0";}

int step=Integer.parseInt(root);

pages=ht.getInteger(stringpage,1);

if(!ht.isNumber(bdid)){

out.print("<meta http-equiv=\"refresh\" content=\"1;URL=first.jsp\"><center><font color=#FF0000><strong>参数错误</strong></font></center>");

}else{

sql = "SELECT btable, name, logo, inform, focus, page FROM board WHERE id="+bdid;

ResultSet board=con.query(sql);board.next();

if(board.getRow()==0){

out.print("<meta http-equiv=\"refresh\" content=\"1;URL=index.jsp\"><center><font color=#FF0000><strong>该版不存在,参数错误或该版以被删除</strong></font></center>");

}else{

table=board.getString(1);

bdname=con.getStr(board.getString(2));

logo=con.getStr(board.getString(3));

information=con.getStr(board.getString(4));

focus=con.getStr(board.getString(5));

main=board.getString(6)+main;

display=board.getString(6)+display;

java.io.File f1=new java.io.File(absDir+relDir+main);

java.io.File f2=new java.io.File(absDir+relDir+display);

if(!f1.isFile()){main="main.jsp";}

if(!f2.isFile()){display="display.jsp";}

//验证页面

if((main.compareTo(_self)!=0)){

response.sendRedirect(main+"?id="+bdid);

}else{

//计算本版总贴数

if(table.compareTo("")==0){table="btable1";}

sql="SELECT COUNT(id) FROM "+table+" WHERE boardid="+bdid;

ResultSet bcount=con.query(sql);bcount.next();

if(bcount.getRow()!=0){

allcount=bcount.getInt(1);

}

//计算页数

sql="SELECT id, title, clas, super, recommendation, locked, userid, username, lastid, lastname, readtimes, retimes, lastretime FROM "+table+" WHERE boardid="+bdid+" AND up='n' ORDER BY lastretime DESC" ;

ResultSet rs=con.query(sql);

rs.last();

count=rs.getRow();

int pcount=count/showrow;

if(count%showrow>0){pcount=pcount+1;}

if(pcount<2)pcount=1;

if(pages<2)pages=1;

if(pages>pcount)pages=pcount;

startrow=(pages-1)*showrow+1;

if(online_enable == "on"){

String uId,uName,ip=request.getRemoteAddr();

if(id.compareTo("")==0){

uId="guest";

uName="guest";

}else{

uId=id;

uName=name;

}

onLine.addUser(uId,uName,(_self+"?id="+bdid),ip,onTime);

}

%>

本页面实现对文章的分页显示功能,验证页面,对各个版块的主题进行显示和处理,可以提高用户的浏览速度,结构更整洁。

----------------------------------------------------------------------------------------------------------------

4.2.3程序运行过程截图

主题显示:pcmain.jsp

图4.3 主题显示

4.3文章发布模块

4.3.1功能说明

用户登陆系统后可以查看其他所有用户发的文章,并可以发布自己的话题,也可响应回复其他用户和自己发表的话题。

4.3.2功能实现

----------------------------------------------------------------------------------------------------------------

文章发表:send.jsp

部分代码:

<%

String bdid=request.getParameter("id");

String id=(String)session.getAttribute("id");

String bdname="";

String main="main.jsp";

if(id==null){response.sendRedirect("login.jsp");}else{

String sql="select name, page from board where id="+bdid;

ResultSet rs=con.query(sql);rs.next();

if(rs.getRow()!=0){

bdname=con.getStr(rs.getString(1));

main=rs.getString(2)+main;

}

con.close();

%>

本页面提供用户的发帖功能,用户可以根据自己的需要发表帖子,可以选择自己的类型,比如普通,原创,转帖等类型,有签名功能,还可以使用多彩文本,给用户提供更完美的选择。

---------------------------------------------------------------------------------------------------------------

4.3.3程序运行过程截图

文章发表:send.jsp

图4.4 文章发表

4.4公告制度模块

4.4.1功能说明

论坛管理员可以通过后台管理系统发布论坛公告,今日话题。

论坛的制度上可以设置对文章操作的客户积分,发帖数,精华帖等功能。

4.4.2功能实现

公告信息:boardset.jsp

部分代码:

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>

<jsp:useBean id="con" scope="page" class="numb1.com.db"/>

<jsp:useBean id="ht" scope="page" class="numb1.com.Dohtml"/>

<%

String id=(String)session.getAttribute("id");id=ht.donull(id);

String root=(String)session.getAttribute("root");root=ht.donull(root);

String bdid=request.getParameter("bdid");

String table="";

String logo="";

String bdname="";

String inform="";

String focus="";

String bdmast="";

boolean test=false;

if(root.compareTo("")==0){root="0";}

int step=Integer.parseInt(root);

String sql="select btable,name,logo,inform,focus,boardmast from board where id="+bdid;

ResultSet rs=con.query(sql);rs.next();

if(rs.getRow()!=0){

table=rs.getString(1);

bdname=con.getStr(rs.getString(2));

logo=rs.getString(3);

inform=con.getStr(rs.getString(4));

focus=con.getStr(rs.getString(5));

bdmast=con.getStr(rs.getString(6));

String mast[]=ht.split(bdmast,"*");

for(int i=0;i<mast.length-1;i+=2){

if(mast[i].compareTo(id)==0){

test=true;

}

}

}con.close();

if(step>2 || test){

%>

本页面是给管理员提供了对版块更好的管理,可以通过发布公告给本论坛的用户最新的通知,还有发表今日话题,能更快的对论坛进行有效的管理。

---------------------------------------------------------------------------------------------------------------

4.4.3程序运行过程截图

公告信息:boardset.jsp

图4.5 公告信息

4.5版块管理模块

4.5.1功能说明

论坛管理员可以通过后台管理系统开控制论坛的版块,管理员可以完成下列功能:添加分类或版面,版面配置或删除.

4.5.2功能实现

--------------------------------------------------------------------------------------------------------------

权限列表:rootlist.jsp

部分代码:

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>

<jsp:useBean id="con" scope="page" class="numb1.com.db"/>

<jsp:useBean id="ht" scope="page" class="numb1.com.Dohtml"/>

<%

String root=(String)session.getAttribute("root");root=ht.donull(root);

String user_id=request.getParameter("id");user_id=ht.donull(user_id);

String user_name="";

String user_ontimes="";

String user_txts="";

String user_retxts="";

String user_point="";

String user_popu="";

String user_sup="";

String user_recom="";

String duty="";

int user_step=0;

boolean test=true;

if(root.compareTo("")==0){root="0";}

int step=Integer.parseInt(root);

if(step<4){

out.print("<meta http-equiv=\"refresh\" content=\"3;URL=../index.jsp\"><center><font color=#FF0000><strong>对不起,您无权进入该页面!</strong></font></center>");

}else{

String user="select step,root,name from user where userid='"+user_id+"'";

ResultSet use_rs=con.query(user);use_rs.next();

if(use_rs.getRow()==0){

test=false;

}else{

user_step=use_rs.getInt(1);

String user_root[]=ht.split(con.getStr(ht.donull(use_rs.getString(2))),"*");

if(user_root.length>1) duty="<a href=../main.jsp?id="+user_root[0]+">"+user_root[1]+"</a>";

user_name=con.getStr(use_rs.getString(3));

}

con.close();

String online="select ontims,txt,re,point,popu,suptxt,recomtxt from online where userid='"+user_id+"'";

ResultSet onl_rs=con.query(online);onl_rs.next();

if(onl_rs.getRow()==0){

test=false;

}else{

user_ontimes=onl_rs.getString(1);

user_txts=onl_rs.getString(2);

user_retxts=onl_rs.getString(3);

user_point=onl_rs.getString(4);

user_popu=onl_rs.getString(5);

user_sup=onl_rs.getString(6);

user_recom=onl_rs.getString(7);

}

con.close();

if(!test){

out.print("<meta http-equiv=\"refresh\" content=\"2;URL=../index.jsp\"><center><font color=#FF0000><strong>该会员不存在!</strong></font></center>");

}else{

%>

论坛管理员可以通过后台管理系统控制论坛的版块,管理员可以完成下列功能:任命斑竹,取消斑竹,改变权限等功能。

---------------------------------------------------------------------------------------------------------------

4.5.3程序运行过程截图

权限列表:rootlist.jsp

图4.6 权限列表

4.6信息管理模块

4.6.1功能说明

信息管理模块主要完成下面的功能。

留言管理;添加管理员; 编辑管理员;设定等级;配置权限;重新登录;安全退出;用户等级。

以上的功能完成了整个论坛的配置,用户的管理,管理员的管理都可以通过对应的链接来完成。

4.6.2功能实现

---------------------------------------------------------------------------------------------------------------

留言管理:msend.jsp

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>发送短消息</title>

<style type="text/css">

<!--

.style2 {color: #FFFFFF}

td{font-size:13px;color:#868686}

th{font-size:15px}

-->

</style>

</head>

<body><br>

<br>

<%

String acid=request.getParameter("id");

%><form name="form1" method="post" action="actsend.jsp">

<table width="480" border="0" align="center" cellspacing="1" bgcolor="#cccccc">

<tr bgcolor="#7188e0">

<th colspan="2"><span class="style2">发 送 留 言</span></th>

</tr>

<tr bgcolor="#f8f8f8">

<td width="79"><div align="right">收信人ID:</div></td>

<td width="364"><% if(acid == null){ %>&nbsp;<input name="acid" type="text" id="acid" size="20" style="BORDER: #aaaaaa 1px solid;color:#686868;"><% }else{%>

&nbsp;<input name="acid" type="hidden" id="acid" value="<%=acid%>"><% out.print(acid);}%></td>

</tr>

<tr bgcolor="#f8f8f8">

<td><div align="right">留言主题:</div></td>

<td>&nbsp;<input name="title" type="text" id="title" size="30" style="BORDER: #aaaaaa 1px solid;color:#686868;">

</td>

</tr>

<tr bgcolor="#f8f8f8">

<td><div align="right">留言内容:<br>

≤100汉字&nbsp; </div></td>

<td>&nbsp;<textarea name="text" cols="45" rows="5" id="text" style="BORDER: #aaaaaa 1px solid; background:#f8f8f8; color:#686868; overflow:auto;"></textarea></td>

</tr>

<tr bgcolor="#f8f8f8">

<th colspan="2">&nbsp; <input name="imageField" type="image" src="../img/next1.gif" onMouseOver="this.src='../img/next2.gif'" onMouseout="this.src='../img/next1.gif'" width="60" height="22" border="0"> &nbsp;<a href="javascript:history.back()"><img src="../img/close1.gif" width="60" height="22" border="0" onMouseOver="this.src='../img/close2.gif'" onMouseout="this.src='../img/close1.gif'"></a></th>

</tr>

</table>

</form>

</body>

</html>

本页面主要实现对注册用户之间的留言管理,可以方便的在用户之间留言,这样增加了消息的隐蔽性,其他用户是接收不到的。

---------------------------------------------------------------------------------------------------------------

4.6.3程序运行过程截图

留言管理:msend.jsp

图4.7 留言管理

第五章 结论

在该系统的开发过程中采用了当今流行的多种热门技术,在开发过程中严格遵守正规软件系统开发的流程,本系统在开发过程中利用JSP和JavaBean相结合的技术充分体现了java这一语言一次开发处处运行的特点。开发中严格遵守软件工程中技术和说明文档的书写和备份,为系统测试和维护提供一个良好的书面说明。

本系统实现了大部分论坛所拥有的功能。使用了JSP和JavaBean相结合的这门技术使系统的可移植性得到很大的提高,在系统将来使用范围进一步扩大的情况下本系统可以在原有的基础上作升级和拓展。

参考文献(References)

[1]彭木根. 数据仓库技术与实现[M]. 电子工业出版社,2002-6

[2]Lou Agosta. 数据仓库技术指南[M]. 人民邮电出版社,2000-11

[3]Efrem G.Mallach. Decision Support and Data Warehouse Systems. 清华大学出版社,2001-1

[4]Marty Hall著,邓英才译. Servlet与JSP核心技术. 人民邮电出版社,2001-10

[5]Michael Abbey, Michael J. Corey, lan Abramson 著,王兰成译. Oracle 8i初学者指南. 机械工业出版社,2001-4

[6] Geng Xiangyi. JAVA Course Design. Tsinghua University Press, 2001-6

[7] Edited by Feisi Technology Product R&D Center. Detailed Explanation of JSP Application Development. Electronic Industry Press, 2002-1

[8] Edited by Feisi Technology Product R&D Center. Detailed Explanation of JAVA TCP/IP Application Development. Electronic Industry Press, 2002-1

[9] Edited by Wangguan Technology. One Hundred Cases of JavaScript Fashion Programming. Mechanical Industry Press, 2001.

[10] Hans Bergsten. He Jianhui, translated by Xu Junjuan. JSP Design. China Electric Power Press, 2004-11

[11] Hans Bergsten . Java Server Pages. 3rd Edition. O'Reilly Publisher, December 2003.

thank you

In the development process of this system, I have received many kinds of help and cooperation. I would like to thank the school leaders for their attention and the guidance teacher Hu Jun for his help in many aspects. At the same time, I would like to thank all the people who provided help during the project development process.

Thanks to my mentor, Mr. Hu Jun, his rigorous and meticulous style has always been a role model for me in work and study; your persuasive teaching and eclectic thinking have given me endless inspiration. The design details and data of this paper are inseparable from your careful guidance. Your serious scientific attitude, rigorous academic spirit, and work style of striving for perfection have deeply infected and inspired me. Help me to quickly integrate into this new design. Thanks to my roommates, who come from various regions and gathered in this strange city. It is you and I who maintain the brotherly relationship between each other and maintain the harmony of family in the dormitory. The days we were together, I will remember forever.

When the dissertation is about to be completed, I can't calm down. From the beginning of entering the project to the successful completion of the dissertation, how many respectable teachers, classmates and friends have given me silent help. Please accept my sincere thanks here!

Guess you like

Origin blog.csdn.net/m0_66999594/article/details/128678554
Recommended