TAILIEUCHUNG - Apress bắt đầu ứng dụng với java google - p 10

CHAPTER 4 ■ SERVLET CONTAINER AND FRAMEWORKS closeDate = (("closeDate")); } catch( pe) { ("Exception " + pe); } // create the new opportunity Opportunity opp = new Opportunity( ("name"), new Double(("amount")).doubleValue(), ("stageName"), new Integer(("probability")).intValue(), closeDate, new Integer(("orderNumber")).intValue(), new Long(("accountId")) ); // persist the entity try { (opp); } finally { (); } ("telesales?action=accountDisplay&accountId="+request. getParameter("accountId")); } } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } } 68 CHAPTER 4 ■ SERVLET CONTAINER AND FRAMEWORKS ■ Note The servlet in Listing 4-8 describes code for. | CHAPTER 4 SERVLET CONTAINER AND FRAMEWORKS closeDate closeDate catch pe Exception pe create the new opportunity Opportunity opp new Opportunity name new Double amount .doubleValue stageName new Integer probability .intValue closeDate new Integer orderNumber .intValue new Long accountId persist the entity try opp finally telesales action accountDisplay accountId request. getParameter accountId public void doPost HttpServletRequest request HttpServletResponse response throws ServletException lOException doGet request response 68 CHAPTER 4 SERVLET CONTAINER AND FRAMEWORKS Note The servlet in Listing 4-8 describes code for interacting with Bigtable. We ll provide more details on the PersistenceManager JDO and JDOQL in Chapter 7. Deployment Descriptor When the web server receives a request for your application it uses the deployment descriptor to map the URL of the request to the code handling the request. Modify the file with the code in Listing 4-9 to use the TelesalesServlet class. The servlet mapping specifies that all incoming requests to telesales be mapped to the newly created servlet defined in the servlet definition. Listing 4-9. The file xml version encoding utf-8 DOCTYPE web-app PUBLIC - Sun Microsystems Inc. DTD Web Application EN http dtd web-app xmlns http xml ns javaee version servlet servlet-name telesales servlet-name servlet-class servlet-class servlet servlet-mapping servlet-name telesales servlet-name url-pattern telesales url-pattern servlet-mapping welcome-file-list welcome-file welcome-file welcome-file-list web-app PersistenceManager The servlet utilizes Bigtable to store data for your .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.