SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 176 | Next

Deepak Vohra

"Ajax in Oracle JDeveloper"

jsp listing to input.jsp in JDeveloper. To run the web
application right-click on input.jsp and select Run as shown in Fig. 10.11.
Fig. 10.11 Running Yahoo Search Web Services Application
10.6 Creating an Ajax Web Search Application for Yahoo 209
The contextual web search form gets displayed. Specify a query term
and one or more context terms and click on the Submit Query button as
shown in Fig. 10.12.
Fig. 10.12 Submitting a Query
The XML response returned by the Web Service gets displayed as
shown in Fig. 10.13. The search results consist of the root element
ResultSet, which contains Result elements for the different web
pages returned by the Web Service. We have not yet used Ajax to send a
web search query. We shall add Ajax to the contextual web search in the
next section.
210 10 Web Search with Ajax
Fig. 10.13 Yahoo WebService Response
10.7 Sending an Ajax Request with Yahoo Search Web
Services
To send an Ajax request we shall use a proxy servlet that routes the
XMLHttpRequest from the browser to the Yahoo Web Service. If an
XMLHttpRequest is sent without a proxy servlet the
XMLHttpRequest does not get sent and an error gets generated.
Error: uncaught exception: Permission denied to call
method XMLHttpRequest.open
A proxy servlet may be developed or the HTTP proxy servlet1 may be
used. Download httpProxyPackage.jar. Add the proxy servlet JAR file to
the Libraries of the YahooAjax project.


Pages:
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184