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

App Engine có một dịch vụ, hình ảnh dịch vụ, có thể được thừa hưởng để thao tác hình ảnh. Để chứng minh làm thế nào để sử dụng dịch vụ này, chúng tôi sẽ hướng dẫn bạn qua việc tạo ra một servlet cơ bản mà sẽ lật hình ảnh tải lên trên trục thẳng đứng. Bạn sẽ tiếp tục xây dựng trên cùng một dự án Eclipse, nhưng bạn cần phải thêm một số thư viện nhiều hơn: 1. | CHAPTER 8 APP ENGINE SERVICES catch MalformedURLException e .println catch lOException e .println You can use URL Fetch to retrieve and parse XML documents call RESTful web services and read RSS feeds. If you want to look at a REST-based web service example set the URL to http findNearby lat lng 9. This is an example of an XML-based web serviceXML-based web service that exposes a public REST API to return nearby country codes. Next you ll take a quick look at another App Engine service for manipulating images. Images Service App Engine has a service Images service which can be leveraged for image manipulation. To demonstrate how to use this service we ll walk you through the creation of a basic servlet that will flip uploaded images on the vertical axis. You ll continue to build on the same Eclipse project but you need to add some more libraries 1. This example uses the Apache Commons FileUpload package. Start by downloading that package from the following location http fileupload. We re using Version for this example. Download and unzip the binary distribution of the package. 2. Drag the file from the lib directory into the WEB-INF lib directory on the Eclipse Package ExplorerEclipse Package Explorer of your project. 3. Right-click the file in the Eclipse Package Explorer and select Build Path Add to Build Path. 4. You also need to use the Apache Commons IO library. Repeat the previous steps after downloading Commons IO from http io. We re using version for this example. 178 CHAPTER 8 APP ENGINE SERVICES Creating the Java Classes Now that the prerequisite libraries have been set up in your project you ll need four new Java classes in order to leverage the Images service. Create a new servlet called ImageTransform. See Figure 8-6 for more information on the options you chose in the New Java Class .

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.