1. Trang chủ
  2. » Công Nghệ Thông Tin

ajax on java oreillay

230 524 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

[...]... the response */ package com.oreilly .ajax. servlet; import import import import import java. io.IOException; javax.servlet.ServletException; javax.servlet.http.HttpServlet; javax.servlet.http.HttpServletRequest; javax.servlet.http.HttpServletResponse; public class AjaxResponseServlet extends HttpServlet { 13 Example 3-1 The AjaxResponseServlet (continued) private static final long serialVersionUID = 1L;... server to convert the key to its decimal value The server then does the simple conversion and returns the value, which is picked up by the callback function and put into the Decimal field Congratulations! You’ve just completed a full Ajax- enhanced Java application As simple as the application is, it demonstrates most of the major components you need in order to develop Ajax applications with Java Running... will also demonstrate how to use JavaScript Object Notation (JSON), a native JavaScript data representation that you may find more convenient than XML 18 | Chapter 3: A Simple Ajax Servlet Chapter 4 CHAPTER 4 XML and JSON for Ajax 4 Do you really need XML for an Ajax application? The previous chapter showed that you don’t always need XML In particular, if you only have one data point, XML is overkill... describes the environment that is needed to run the Ajax examples in this book The examples use the Tomcat container, but if you are experienced with another J2EE container, you should be able to use that container as well Chapter 2, JavaScript for Ajax This chapter explains how to use JavaScript to access Ajax functionality and demonstrates how JavaScript is used to make asynchronous calls with the... com.AJAXbook.servlet.AjaxResponseServlet 1 AjaxResponseServlet /response index.html There is only one servlet in this web application, the AjaxResponseServlet... gap between a rich client application and a thin, browser-based client application This book will introduce you to Ajax by illustrating how to create Ajax applications in a server-side Java environment: how to add Ajax features to servlet-based applications, JSPs, JSF applications, and so on So, join me in this exciting endeavor: let’s strive to make our web applications more interactive, less boring,... documentation does require permission We appreciate, but do not require, attribution An attribution usually includes the title, author, publisher, and ISBN For example: Ajax on Java by Steven Douglas Olson Copyright 2007 O’Reilly Media, Inc., 978-0-596-10187-9.” If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at permissions@oreilly.com... another layer of scripting to a JSP page can only add to the confusion However, JavaScript runs entirely on the browser and is therefore very fast There’s no waiting for the server to generate a response: JavaScript can compute a result and update the page immediately Ajax adds server interaction, but without the Submit button Whenever data is needed, the JavaScript in the web page makes a request,... chapter Chapter 9, JavaServer Faces and Ajax This chapter provides an example of how to use Ajax with JavaServer Faces Chapter 10, Google Web Toolkit The Google Web Toolkit, which allows for roundtrip debugging on Ajax code, offers a very exciting entry into using Ajax with Java This chapter provides a tutorial for using this cutting-edge toolkit privided by Google for Ajax developers Conventions Used in... data that the JavaScript displays in the existing page The result is that your web application feels a lot more like a desktop application In short, you can achieve a rich application experience in your web pages by using Ajax This book won’t attempt to teach JavaScript, or even to analyze its pros and cons I assume that you have had some exposure to JavaScript If you’re new to it, check out JavaScript: . Ajax on Java Other Java ™ resources from O’Reilly Related titles Learning Java Java in a Nutshell ™ JavaServer Pages JavaServer Faces JavaScript: The Definitive Guide Learning JavaScript Ajax. illustrating how to create Ajax applications in a server-side Java environment: how to add Ajax features to servlet-based applications, JSPs, JSF applications, and so on. So, join me in this exciting. container as well. Chapter 2, JavaScript for Ajax This chapter explains how to use JavaScript to access Ajax functionality and demonstrates how JavaScript is used to make asynchronous calls with the XMLHttpRequest

Ngày đăng: 27/10/2014, 00:23

Xem thêm: ajax on java oreillay

TỪ KHÓA LIÊN QUAN

Mục lục

    Assumptions This Book Makes

    Contents of This Book

    Conventions Used in This Book

    How to Contact Us

    A Minimalist Guide to Setting Up Tomcat

    How Is Our JavaScript Function Called?

    How Do We Get the Value of the Key Pressed?

    A Simple Ajax Servlet

    Building and Deploying the Ajax Application

    So Where’s the XML?

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w