The first stock of the blockchain data center



Interconnected online sponsored comprehensive technology books, such as large-scale portal website.

After the publication of the book "Java Web integrated development: JSP+AJAX+Struts+Hibernate", another new online sponsorship of online sponsorship, Java technology, "such a large portal is made" has been listed!

Essential information

Publishing House: Electronic Industry Press

Page number: 907 pages

Date of publication: 03 month of 2010


Bar code: 9787121102660

Version: First Edition

Loading: paperback

Kai Ben: 16

The language of Zhengwen: Chinese

Series Name: Java development expert


A brief introduction to the author

Liu Bin is an online Java architect, senior software engineer and senior lecturer of Java EE. In 2007, he published "Java Web integrated development: JSP+AJAX+Struts+Hibernate", the book, engaged in Java EE Enterprise Application Research for more than ten years, and has been responsible for the system architecture and project management of many large telecommunications, financial and real estate projects, and accumulated rich practical experience. The mainstream JavaEE open source framework has been studied, especially for the lightweight Java EE integration and development.

Recommended order

In the academic work in the field of Java EE, there are few specialized works devoted to the analysis of large portals from the development of technical architecture to instances, and to the complete process of Web optimization and the deployment of the final server and the perfect knowledge system.

At present, there are many small and medium enterprises in China, which requires a large number of all-around or more Web technical professionals, which is beneficial to the project and the progress and quality assurance of the project. Especially large portals, with the rapid development of business, the amount of access has increased exponentially. How to ensure that the response performance of the business system meets the needs of business development is a key issue to be considered from the beginning. This means that from the selection of the initial development technology, the selection of the server operating system, the configuration and optimization of the server application software to the server cluster and the load balancing, there must be a high performance and extensible plan.

The birth of Java is doomed to dedicate to the progress and development of the Internet. Practice has proved that Java has shown excellent performance in the network application, and the many outstanding open source frameworks that come forth later are more important for the development of Java Web technology. This is a great happiness for Java Web programmers.

The publication of this book has brought the dawn for the programmers exploring on the road to the development of large portal sites. It has brought hope for those who strive to improve the whole knowledge system of the Web application project and open the precedent of the Java EE professional application field, so that the Java Web will have a Bible to the ideal side of the ideal.大型门户网站是这样炼成的



With the rapid development of Internet technology and the continuous improvement and optimization of the Java language, more and more Web programmers have stepped on the road of Java Web application and development. The most primitive Java Web programs are all implemented by JSP, and JSP pages contain both HTML tags and Java business logic code, making the entire JSP page overstaffed and difficult to maintain. In order to standardize the development of Java Web applications, SUN has launched Model1 and Model2 models. Introducing JavaBean technology in the Model1 mode, using JavaBean to encapsulate the business logic code, effectively separating the business logic code from the JSP page. It can not help the process control JavaBean, until the Model2 mode introduces Servlet technology to truly realize the separation of the visual layer, the model layer and the control layer. From then on, the Java Web application development has entered a standardized era. . Struts 2, the classic implementation of the Model2 model, has the advantages of modular, flexible, and reusable components, and simplifies the development of Java Web applications based on MVC.

        The era is developing, technology is progressing, and the processing requirements for various complex data and business logic are also increasing. The MVC three layer model can not fulfill the hierarchical requirements of high performance and low coupling framework. At this time, the concept of persistent layer is introduced to encapsulate the persistence and access operation of the underlying data. In many commercial or open source persistent layer middleware, Hibernate 3.2 has become the most ideal underlying data exchange component in the Struts 2 framework because of its advantages and performance.

        The development efficiency of the traditional Java EE application is low, and the support of the application server vendors on various technologies is not really unified. The application of Java EE has not really realized the commitment of Write Once and Run Anywhere. Spring 2.5, as an open source middleware, is independent of various application servers, and does not even have to apply the support of the server. It also provides the function of the application server, such as sound and information. Spring 2.5 is committed to all levels of Java EE application solutions, rather than just focus on a certain level of solution. It can be said that Spring 2.5 is a one-stop choice of enterprise application development, and runs through presentation layer, business layer and persistence layer. However, Spring 2.5 does not want to replace those existing frameworks and integrate them seamlessly.

        On the basis of JSP 2 technology, integrating Struts 2, Hibernate 3.2 and Spring 2.5 technology development Java Web application has become the mainstream Java Web development technology system, and is referred to as "gold partner" in the field of Java EE development.

The main contents and organizational structure of the book

        Taking the development of large portals as an example, the Java Web application development technology combining JSP 2, Struts 2, Hibernate 3.2 and Spring 2.5 is introduced in detail in this book. In view of the different learning stages of readers, the three parts of technology, practice and deployment are explained step by step.

Technical article

Chapter 1~6 is a technical chapter. It mainly explains the SSH 2 combination framework of high performance and large portals, and also introduces the whole system structure of the portal, the selection of server operating system, the guiding ideology of the portal website and the application of various server software, so that the readers have a more comprehensive understanding of the development of the portal website.

The main contents of the technical article include:

Analysis of large portal architecture

MVC mixed blood pet Struts 2

Detailed interpretation of Struts 2 tag library and application of AJAX Technology

ORM middleware celebrities Hibernate 3 takes over the persistence layer

Hibernate 3 Persistence technology practice and performance optimization

Take full advantage of Spring 2.5's IoC weapon system to manage the Bean world


Practice text

Chapter 7~12 is a practice chapter, with a large-scale e-commerce portal project ePortal as a comprehensive example (example demonstration URL is, which vividly demonstrates the specific application details of the SSH 2 combination framework technology, so that readers can further digest and absorb the SSH 2 technology in the technical text.

The main contents of the practice chapter include:

SSH2 warm-up - building a news release system

General news collection system

Membership registration and membership management system

The realization of commodity classification management

Create new shopping cart and order management system

I must for users of the system management and traffic statistics



Chapters 13 to 15 are deployment articles, focusing on SEO search engine optimization and RHEL 5 based server architecture technologies.

The main contents of the deployment paper include:

Portal SEO - SEO Technology

RHEL 5 based server architecture

Load Balancing and Server Clustering


Features of this book
This book provides a set of practical mainstream development technologies for lightweight Java EE application developers, incorporating many years of Java EE application development experience. Any knowledge points are accompanied by examples to explain, each instance provides synchronous video tutorials, greatly reducing the reader's learning cycle, reducing the difficulty of learning. In addition to the video tutorials for up to several tens of hours, the CD-ROM provided with the book also provides source code programs for all the examples in the book.
Who should use this book?
The language of the book is simple and easy to understand. For beginners of light-weight Java EE application development, it is a good introductory teaching material. The content is both practical and comprehensive, supplemented by example video tutorials, so that readers can easily master what they have learned. For the experts, this book is also a This rare reference manual.
In the course of learning, if you have any questions, you can log in to to ask questions and inquiries. The author will provide online Q&A service for everyone at the first time!
table of Contents
Section 1 Technology
Chapter 1 Large Portal Architecture Analysis 3
1.1 Differences between large portal websites and small business websites 3
1.2 Anatomy of a High Performance, High Load Portal Architecture 9
1.2.1 Selection of Server Operating System 10
1.2.2 DNS Server BIND 16
1.2.3 Cache Server Squid 18
1.2.4 HTTP Server with Load Balancing Apache 19
1.2.5 Web Server Tomcat with Clustering Support 21
1.2.6 Open Source Database Server Proud MySQL 23
1.2.7 Powerful FlV Streaming Media Server RED5 24
1.3 Guidelines for Portal Development 26
1.4 SSH 2 Composite Framework - The First Choice for Portal Development 28
1.4.1 MVC Mixed Breed Struts 2 28
1.4.2 Behind-the-scenes Finance Minister Spring 2.5 30
1.4.3 ORM Middleware Shannon Hibernate 3.2 31
1.5 Summary 32
Chapter 2 MVC Mixed Breed Struts 2 33
2.1 Meet MVC rookie Struts 2 33
2.1.1 MVC Overview 33
2.1.2 MVC implementation of Struts 2 35
2.1.3 The basic composition of Struts 2 36
2.1.4 Introduction to Struts 2 Commonly Used Classes 38
2.1.5 Struts 2 Business Controller Action Implementation 39
2.1.6 Processing Results of Struts 2 Result 45
2.1.7 Powerful Expression Language OGNL 47
2.1.8 Struts 2 Run Process Analysis - HelloWorld 48
2.1.9 Struts 2 exception handling 52
2.2 Struts 2 Configuration Essentials 54
2.2.1 Struts 2 Configuration Implementation in web.xml 54
2.2.2 Struts 2 attribute configuration file explain 55
2.2.3 Struts 2 core configuration file struts.xml explain 57
2.3 Struts 2 Application Development Practice 61
2.3.1 Struts 2 Application Development Environment Construction 62
2.3.2 Basic Development Steps for Struts 2 Applications - Building an ePortal Application 69
2.3.3 Integrated FCKeditor 80 in Struts 2
2.3.4 Integrated DisplayTag in Struts 2
2.4 Struts 2 Internationalization 85
2.4.1 Chinese Localization of Web Applications 85
2.4.2 Internationalization of Struts 2 Applications 87
2.4.3 Dynamic Switching of Struts 2 International Languages ​​89
2.5 Verification framework for Struts 2 90
2.5.1 Manual Verification in Action 90
2.5.2 Invoking Verification Framework for Automatic Verification 91
2.5.3 Customized Struts 2 Verification Error Messages 92
2.5.4 Struts 2 with Verifier 92
2.6 Struts 2 Interceptors 94
2.6.1 Introduction to Struts 2 Built-in Interceptors 95
2.6.2 Defining and Using an Interceptor Stack 97
2.6.3 Using Custom Interceptors 98
2.7 Summary 100
Chapter 3 Detailed Struts 2 Tag Library and AJAX Technology Application 103
3.1 Struts 2 Themes and Templates 103
3.2 Detailed Struts 2 Control Tags 105
3.2.1 If/elseif/else tag details 105
3.2.2 Iterator Tag Details 106
3.2.3 Detailed append tag 108
3.2.4 Detailed explanation of generator tag 110
3.2.5 detailed explanation of the merge tag 112
3.2.6 detailed description of the subset label 113
3.2.7 Detailed description of the sort tag 115
3.3 Detailed Struts 2 Data Labels 116
3.3.1 Detailed action tag 116
3.3.2 Bean Tag Details 118
3.3.3 Details of the date tag 120
3.3.4 Details of the debug tag 121
3.3.5 Detailed explanation of i18n tags
3.3.6 Detailed include tags
3.3.7 param tag details 126
3.3.8 Detailed explanation of the push tag 127
3.3.9 detailed description of set tags
3.3.10 Details of the text tag 129
3.3.11 Detailed Explanation of Url Tags 130
3.3.12 Details of the property tag 132
3.4 Detailed Struts 2 Form Labels 134
3.4.1 details of checkboxes 136
3.4.2 Checklist for checkboxlist tag 137
3.4.3 Detailed combobox tags 138
3.4.4 detailed doubleselect tag 139
3.4.5 detailed explanation of file tags 141
3.4.6 Detailed Form Tags 144
3.4.7 Details of the hidden tag 143
3.4.8 Detailed Explanation of the Select Tag 143
3.4.9 Detailed explanation of the optgroup tag 144
3.4.10 optiontransferselect tag details 144
3.4.11 Detailed Explanation of the Password Tag 146
3.4.12 Radio Tag Details 147
3.4.13 Detailed Explanation of reset and submit Tags 148
3.4.14 Detailed Explanation of Textarea Label 149
3.4.15 Detailed explanation of textfield tags 149
3.4.16 details of the token tag 150
3.4.17 updownselect tag details 151
3.5 Struts 2 AJAX tag explain 156
3.5.1 Detailed description of the a and submit tags 157
3.5.2 Explanation of autocompleter tag 158
3.5.3 Detailed explanation of datetimepicker 160
3.5.4 Detailed div tag 161
3.5.5 Detailed explanation of the head tag 162
3.5.6 tabbedPanel tag details 163
3.6 Struts 2 other tags detailed 166
3.6.1 Actionerror and actionmessage tag details 166
3.6.2 Detailed explanation of fielderror tag 167
3.6.3 Tree and treenode tag details 168
3.7 Struts 2 Fully Supports AJAX 174
3.7.1 Raw AJAX Technology Application in Struts 2 174
3.7.2 AJAX implementation based on DWR 179
3.7.3 DWR-based AJAX Form Validation 183
3.7.4 AJAX implementation based on JSON plug-in 185
3.8 Summary 190
Chapter 4 ORM Middleware Hibernate 3 Take Over Persistent Layer 191
4.1 Introduction to ORM 191
4.1.1 Persistence and Persistence Layer 191
4.1.2 JDBC Weaknesses 192
4.1.3 Entity Domain Model and Relational Data Model 193
4.1.4 ORM Middleware 196
4.2 Introduction to Hibernate 196
4.2.1 Hibernate Architecture 196
4.2.2 Introduction to Hibernate API 197
4.2.3 Configuring Hibernate 198
4.2.4 Hibernate mapping configuration file 201
4.2.5 Experience Hibernate (Member Management) 203
4.3 Hibernate mapping mechanism 212
4.3.1 Hibernate's basic mapping data types 212
4.3.2 Hibernate's Primary Key Mapping 218
4.3.3 Hibernate Entity Mapping 228
4.3.4 Mapping One-To-One Associations 228
4.3.5 Mapping Many-to-One-way Relationships 235
4.3.6 Mapping One-to-Many Bidirectional Relationships 239
4.3.7 Mapping one-to-many bidirectional self-association 244
4.3.8 Mapping Many-to-Many One-Way Associations 247
4.3.9 Mapping Many-to-Many Bidirectional Relationships 252
4.3.10 Map Composition Relationship 256
4.3.11 Mapping inheritance relations 260
4.3.12 Hibernate's Collection Mapping 266
4.4 Summary 270
Chapter 5 Hibernate 3 Persistence Technology Practice and Performance Optimization 271
5.1 Introduction to Common Methods for Manipulating Persistent Objects 271
5.1.1 Using the Session's beginTransaction() Method 272
5.1.2 Using Session's close() Method 273
5.1.3 Using Session's connection() Method 273
5.1.4 Use the Session's delete() Method 274
5.1.5 Using the Session's get() Method 274
5.1.6 Using Session's load() Method 275
5.1.7 Using Session's save() Method 275
5.1.8 Using Session's update() Method 276
5.1.9 Using Session's saveOrUpdate() Method 276
5.1.10 Using Hibernate's isInitialized() and initialize() Methods 277
5.1.11 Cascading operations between persistent objects 277
5.2 Hibernate's search strategy 291
5.2.1 Search Now 291
5.2.2 Delayed Search 296
5.2.3 Urgent Left Outer Connection Search 300
5.3 HQL Query Mode 303
5.3.1 Basic Query 303
5.3.2 Conditional Query 305
5.3.3 Paging Query 307
5.3.4 Connection Query 308
5.3.5 Subqueries 311
5.3.6 Dynamically instantiating query results 313
5.4 QBC Query Method 314
5.4.1 Basic Query 315
5.4.2 QBE Query 317
5.4.3 Paging Query 318
5.4.4 Compound Query 318
5.4.5 Offline Query 319
5.5 Local SQL Query 320
5.6 Hibernate batch processing 322
5.6.1 Bulk Insertion 322
5.6.2 Batch Update 323
5.6.3 Bulk Delete 324
5.7 Hibernate transaction management 325
5.7.1 Transaction Boundary Declaration 325
5.7.2 Concurrency Control 326
5.7.3 Pessimistic Lock 327
5.7.4 optimistic locking 328
5.8 Hibernate's Cache Mechanism 332
5.8.1 Hibernate Cache Classification 332
5.8.2 Hibernate Cache Range 332
5.8.3 Hibernate Cache Management 333
5.8.4 Concurrency Strategy for Hibernate Level 2 Cache 333
5.8.5 Hibernate secondary cache configuration 334
5.9 Hibernate Application Performance Optimization 336
5.10 Multiple Data Source Applications 338
5.11 Application of JDBC 343
5.12 Hibernate Calling Stored Procedures 343
5.13 XML Data Persistence 346
5.14 Summary 348
Chapter 6 Take full advantage of Spring 2.5's IoC tool to manage the Bean world.
6.1 The Spring Gifts of Java Programmers - Spring 2.5 349
6.1.1 Ten Reasons to Love Spring 2.5
6.1.2 A look at Spring 2.5 features 351
6.1.3 Spring 2.5 - Control Inversion and Dependency Injection 353
6.1.4 What is "face oriented programming AOP" 356
6.1.5 Spring 2.5 Bible - Interface-Oriented Programming 358
6.1.6 Starting the Spring 2.5 Journey - Hello World 359
6.2 Spring 2.5 Core Technology 364
6.2.1 BeanFactory BeanFactory Introduction 364
6.2.2 Useful Bean Factory ApplicationContext 365
6.2.3 Detailed Spring 2.5 Configuration File