Learn Java for Web Development
CHAPTER 3: Best Practices in Java EE Web Development 157 The Service to Worker pattern, like the Dispatcher View pattern, consis ...
158 CHAPTER 3: Best Practices in Java EE Web Development Note In spite of applying the Java EE patterns and incremental evolutio ...
CHAPTER 3: Best Practices in Java EE Web Development 159 Why Use a Framework? While Java EE does a great job of standardizing th ...
160 CHAPTER 3: Best Practices in Java EE Web Development When the HTTP request arrives from the client, the front controller loo ...
161 Chapter 4 Building a Web Application Using Struts 2 A wounded deer leaps the highest. —Emily Dickinson The Struts framework ...
162 CHAPTER 4: Building a Web Application Using Struts 2 Before diving into Struts 2, it is worthwhile to understand the archite ...
CHAPTER 4: Building a Web Application Using Struts 2 163 The sequence of events in Struts is as follows: The ActionServlet dele ...
164 CHAPTER 4: Building a Web Application Using Struts 2 As you can see from Figure 4-2, Struts 2 is also an MVC-based framework ...
CHAPTER 4: Building a Web Application Using Struts 2 165 This action class is configured in the struts.xml file, as illustrated ...
166 CHAPTER 4: Building a Web Application Using Struts 2 Listing 4-4. Using the Action Interface import com.opensymphony.xwork2. ...
CHAPTER 4: Building a Web Application Using Struts 2 167 //getters and setters // ... public String execute() { return "SUCCESS" ...
168 CHAPTER 4: Building a Web Application Using Struts 2 In Listing 4-8, the action mapping maps the logger interceptors to the ...
CHAPTER 4: Building a Web Application Using Struts 2 169 Struts 2 comes with a number of predefined result types. Struts allows ...
170 CHAPTER 4: Building a Web Application Using Struts 2 The dependencies, explicitly configured and transitive, described in th ...
CHAPTER 4: Building a Web Application Using Struts 2 171 Click Next and configure the options as illustrated in Figure 4-5. Figu ...
172 CHAPTER 4: Building a Web Application Using Struts 2 Click Next and as illustrated in Figure 4-6 select Catalog, GroupId, an ...
CHAPTER 4: Building a Web Application Using Struts 2 173 Click Finish. The project with the name described in the Artifact Id fi ...
174 CHAPTER 4: Building a Web Application Using Struts 2 The directory structure illustrated in Figure 4-8 follows the normal Ma ...
CHAPTER 4: Building a Web Application Using Struts 2 175 Your pom.xml file will look like Listing 4-14. Listing 4-14. pom.xml 1. ...
176 CHAPTER 4: Building a Web Application Using Struts 2 You need to configure the servlet filter in the deployment descriptor, ...
«
4
5
6
7
8
9
10
11
12
13
»
Free download pdf