Đang chuẩn bị liên kết để tải về tài liệu:
Apress bắt đầu ứng dụng với java google - p 9

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

CHAPTER 4 ■ SERVLET CONTAINER AND FRAMEWORKS Close Date Order There is no form validation so please fill in all fields. Figure 4-6. The Account Display web page with the newly created opportunity 58 CHAPTER 4 ■ SERVLET CONTAINER AND FRAMEWORKS Model Our model consists of two POJOs for the Account and Opportunity objects used by the application. These domain-specific objects are constructed by the servlet and passed to and from the controller to the views. Your application uses JDO, therefore Listings 4-6 and 4-7 represent the objects along with the. | CHAPTER 4 SERVLET CONTAINER AND FRAMEWORKS td style color ffffff font-weight bold Close Date td td bgcolor ffffff input type input name closeDate value 1 1 2012 td tr tr bgcolor 407BA8 td style color ffffff font-weight bold Order td td bgcolor ffffff input type input name orderNumber value 7 td tr tr td colspan 2 bgcol or ffffff align center input type submit value Submit td tr table form There is no form validation so please fill in all fields. body html Figure 4-6. The Account Display web page with the newly created opportunity 58 CHAPTER 4 SERVLET CONTAINER AND FRAMEWORKS Model Our model consists of two POJOs for the Account and Opportunity objects used by the application. These domain-specific objects are constructed by the servlet and passed to and from the controller to the views. Your application uses JDO therefore Listings 4-6 and 4-7 represent the objects along with the required annotations for JDO. Listing 4-6. The code for Account.java package com.appirio.entity import javax.jdo.annotations.IdGeneratorStrategy import javax.jdo.annotations.IdentityType import javax.jdo.annotations.PersistenceCapable import javax.jdo.annotations.Persistent import javax.jdo.annotations.PrimaryKey @PersistenceCapable identityType IdentityType.APPLICATION public class Account @PrimaryKey @Persistent valueStrategy IdGeneratorStrategy.IDENTITY private Long id @Persistent private String name @Persistent private String city @Persistent private String state @Persistent private String phone @Persistent String website public Account String name String city String state String phone String website this.name nam e this.city cit y this.state state this.phone phone this.website web site @return the id public Long getId 59 CHAPTER 4 SERVLET CONTAINER AND FRAMEWORKS return id @param id the id to set public void setId Long id this.id id @return the name public String getName return name @param name the name to set public void setName String name this.name nam e @return the city public .