Java Web basics: first, how to learn and learn the basic content

Source: Internet
Author: User

There were a lot of things during this time, so I decided to copy the content from my book and share it with you. The following content is the preface of the Book, which describes the thoughts and main contents used in this book. These ideas have also accumulated many years of teaching experience.

I have used many JSP teaching materials during my years of teaching. It should be said that the teaching materials are well written. However, it is learned that the students can understand the situation when they listen to the course, but they do not know how to use it after learning it. It is still difficult for the students to write a website on their own. Therefore, I have been studying the causes over the past few years. I have found some problems and tried some methods to solve them. In addition, I have conducted experiments in some classes to improve the effect. Now I want to share these ideas with other teachers so that students can learn and use them. So I have the idea of writing this book. Thoughts used in this book Application-driven, not knowledge-drivenThe Compiling Style of existing teaching materials is basically based on the classification of JSP knowledge points. For example: JSP overview, JSP basics, internal objects, JSP actions and commands, JavaBean, JDBC, Expression Language, internationalization, standard tag library, etc. These teaching materials are driven by knowledge points, emphasizing knowledge points. In practical applications, we need to solve various problems. Different problems require different knowledge points and are problem-driven. Therefore, this book is intended to focus on applications, this article describes how to solve problems in applications and what knowledge points are required to complete related functions. At the same time, in order for students to fully master the knowledge, relevant knowledge points will be listed in each part. Complete project rather than irrelevant examplesThe examples used in different chapters of most JSP books are unrelated, so that after learning the complete course, the student union will feel that the example is messy. All the content in this book is centered on a project. Each part of this book completes a function of the project, and practical training is also part of the entire project. In this way, students can complete a complete project after the course ends. It not only teaches you how to implement, but also teaches you how to designFor each example, it not only teaches you how to write programs, but also how to design them so that students can bypass the class. Imitate and create your ownEvery time a teacher introduces a case, the student will complete a similar function and deepen the knowledge through such imitation. Finally, students can complete some functions independently. Equal emphasis on practical training and teachingEach part includes two parts: Instructor teaching and student training. Combine theoretical teaching materials with practical training teaching materials. JSP Used for display, Servlet Used for controlIn the early stages of JSP development, Java Web applications were developed mainly by embedding Java code in webpages. the disadvantages of this method were gradually recognized. Java Web development is often completed in collaboration with multiple technologies. jsp mainly completes the interaction process with users, and should not contain the processing code and control code. Servlet does not have any advantage in displaying information, so it is determined not to use servlet to display information. This book strictly follows this idea. Content organization of this bookThe entire course is a general project: the online bookstore system divides the entire project into three parts: l book information management l user management l the content of each part of shopping cart and order management basically covers all the knowledge points of JSP. The entire course is arranged on two lines: Instructor teaching and student training. Instructor lecturesThe course content is part of the user management function. The user management function is divided into small cases, each case can complete a function, each case contains several knowledge points. The teaching method is to explain and lead students to perform operations and integrate knowledge points into the case. Student TrainingThe training content is part of the library information management. There will be a student practical training after each lesson, which is consistent with the teaching content of this lesson. The function is basically the same as that explained by the instructor. For example, the instructor explains the user information modification function, and the student training content is the book information modification function. Comprehensive trainingAfter explaining the basic content and training, a comprehensive example is provided at the end of this book: shopping cart and order management. This part is introduced by the instructors and then trained by students. Novel contentThe content in this book is based on the latest JSP specifications. Use ModeThe MVC mode is used by almost all Java Web frameworks. This book uses the MVC mode when introducing Java Web development-related technologies. JSP is mainly used to display information. Therefore, when using JSP, avoid embedding Java code in JSP. Although servlet can display information to users like JSP, servlet is mainly used for control. The display function should be in the JSP file. Therefore, when introducing servlet, strictly follow this idea and only write control code in servlet. Debug programThe ability to debug programs in any language is a very basic but important capability. This book uses a specific chapter to analyze common errors and introduce common debugging methods. Writing MethodFirst, describe the target, and then further demonstrate the target through the running effect. Based on the objective analysis programming ideas, the last step is to show readers how to write this code. Learning ObjectivesN creating a website includes building a runtime environment and creating a website framework. N information can be displayed in multiple ways. Generally, information is the most basic function of Web applications. N information submission: submitting information to the server through the interface is required for the information update function on the website. N the information retrieval function helps you find the desired information from a large amount of information provided by the website. Such a function is essential for a website with a large amount of information. N information processing can complete information processing on the website. N information management can manage a large amount of information in various websites. N security control includes logon and permission control. N exception handling can handle various exceptions on the website. N paging display pages are displayed on many websites. After learning this course, you should be able to master it. N. the shopping cart function is available in almost all e-commerce websites. After learning this course, you should be able to compile the shopping cart for various websites. Main ContentChapter 2 provides an overview of web applications and how to build a Java Web application runtime environment and create a web application. Through this chapter, you should be able to know what Java Web applications are, what conditions are required for developing Web applications, and how to create a web application. Chapter 2 and Chapter 2 solve the problem of Java Web application input and output. Chapter 2 describes how to use various forms to submit information in Java Web applications and how to use JavaScript code on the client to verify various types of information entered by users. Through this chapter, readers should be able to solve the input problems in Web applications. Chapter 2 describes how to output information to users in Java Web applications and how to output information. Through this chapter, you should be able to master the output of Java Web applications. From Chapter 1 to Chapter 2, the login function is reconstructed three times, basically the development history of Java Web technology. Chapter 4: Use a pure JSP file to complete the login function. In Chapter 5th, the login processing process is extracted and encapsulated using Javabean to form the JSP + JavaBean mode. In chapter 2, the control functions in JSP are extracted and implemented using Servlet to form the JSP + servlet + JavaBean mode. At the same time, the MVC mode is introduced in chapter 6th. Chapter 1 to Chapter 2 further strengthen the MVC mode and introduce common operations on databases. Chapter 7th describes how to use JDBC to perform database operations, how to use the connection pool to perform database operations, and finally how to view user information. Chapter 2 introduces paging display in Java Web applications, including how to implement paging in JavaBean and how to implement paging in JSP pages. Chapter 2 further strengthens database-related operations and MVC modes by adding user information. Chapter 2 describes the general implementation of the modification and deletion functions in Java Web applications through the modification and deletion of user information. Chapter 2 to Chapter 11th describes Java Web application internationalization, exception handling, and security issues. Chapter 2 describes how to internationalize Java Web applications through the user information View Interface. Chapter 2 first analyzes possible exceptions in Web applications, and introduces various exception handling methods, including Java Exception Handling Mechanism and JSP exception handling mechanism, the exception handling mechanism through the configuration file. Chapter 2 introduces the Security Issues and Solutions of Java Web applications, includes session-based security control, filter-based security control, centralized security control using filters, security control of some code on the page, and security control using graphic verification codes. Chapter 2 is a comprehensive training. It analyzes the main writing ideas of the shopping cart and order management functions, and provides key knowledge points. Readers can complete their own shopping cart and orders based on these explanations. Through this comprehensive training, readers should be able to master the basic Java Web development skills. Chapter 2 describes common errors and debugging programs during the compilation and running of Java Web applications. The ability to debug programs is essential to programmers. The content in Chapter 1 can speed up your understanding of this capability. The book is followed by three appendices. Appendix 1 is a common knowledge point in Java Web development, which is easy for readers to learn. Appendix 2 is a very important interface method in JSP technology. Readers can search and use it during learning. Appendix 3 is the index of the content of this book, because this book is not divided into chapters according to the knowledge points in other books, but by application. If you first find the knowledge points, you can use this index. Suggestions for studentsYou must start the handwriting program to discover the problem. Do not be afraid of errors. It is impossible to write programs without errors. If you are skilled, fewer errors will occur. Make full use of the network, and the various resources on the network are rich. To learn English well, many documents are in English. A good study of Java basics, JSP syntax book is not much, it is difficult to be in the Java language itself. Suggestions for instructorsTime should be given to students. No matter how good you are, if the students do not do it themselves, everything will be in vain. It helps students Debug Programs and tell students when debugging programs. It is best to tell students what they want during the debugging process. Encourage students to try to debug the program on their own. PrerequisitesThe prerequisites include Java, HTML, and JavaScript. Java Web development technology is based on the Java language. the compiling of files uses the basic syntax of Java, and the final running is also based on the Java program running mode. If you are not familiar with Java, you need to study Java. The knowledge of Java that can be used includes the basic syntax of Java, including identifiers, operators, variables, methods, and process control. Java object-oriented features, including the definition and use of packages, classes, and interfaces. Common Java class libraries, including string and stringbuffer related to date processing, date and calendar, dateformate for formatting date and number, numberformat, and collection framework. Exception Handling is unavoidable when writing java files. For the HTML language, we need to master the most basic syntax, including the following aspects: the structure of the webpage form Element JavaScript language is executed on the client, so if you want to execute the function on the browser side, you need to use the Javascript language. Currently, a large amount of JavaScript content is used on the website, including client verification. Further study suggestionsJava Web development technology is part of Java enterprise-level applications and belongs to the web layer of Java enterprise-level applications. If you want to learn more about Java enterprise-level applications, you can learn Java EE enterprise-level development technology. Includes enterprise-level JavaBean (EJB) technology and RMI, JNDI, JTA, JTs, data source, javamail, JAAS, connector and other services. In addition, the most basic Java Web Development Technology about Java Web development is introduced in the book. To improve the development efficiency of web applications and the management and maintenance of web applications, many Java Web-based frameworks have emerged. These frameworks can improve the development efficiency and facilitate the maintenance of web applications. Common web application frameworks include JSF, struts, tapestry, and webwork. Among them, JSF, struts, tapestry, and webwork belong to the web layer framework and are mainly used to develop Web applications. The functions are basically the same and each has its own merits. In the latest version of Java Enterprise applications, JSF is an integral part of Java Web technology. You can select a web application framework for learning. In addition to these web application frameworks, there are also some technologies that can simplify database operations, usually known as the persistent layer framework, commonly known as Hibernate and toplink. Hibernate is relatively popular, which affects the Java persistence specification in later versions of ejb3. Readers can choose one of them to learn from. Of course, if you want to learn Java enterprise-level applications, you do not need to learn these Persistence frameworks, Because Java enterprise-level applications contain Java persistence APIs, in addition, there are entity beans in earlier versions of Java Enterprise applications. Another popular technology, spring, is an enterprise-level application framework parallel to Java ee. But it is not a standard for Java enterprise-level application development, but it is very successful. It is also a good technology that readers can choose to learn. If you want to learn it, take action. Next Lecture: Overview of Web Applications Li xucheng Csdn blog : Http://blog.csdn.net/javaeeteacher Invite you as a friend: Http://student.csdn.net/invite.php? U= 124362 & C = 7be8ba2b6f3b6cc5
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.