XML Server Getting Started    
Accessing server side objects from the client code with  XML over HTTP  calls 
XMLSP technology enables developers to implement a great deal of presentation specific code within the browser without 
overwhelming the server with the straight GUI related tasks. However, when it comes to server specific tasks, be that an 
implementation of business rules that should not be exposed to the users for security reasons, or be that a file access which is 
technically impossible from within the browser's  sandbox  there is a need to access server side objects from the JavaScript 
 method of 
 object (/xmlsp/htc/xmlapi.htc) facilitates direct HTTP request from your client 
side JavaScript to any URL. In a very schematic way of explaining things, it enables you to invoke your own JSP, servlet or 
ASP page simply as a remote function taking parameters and returning values: 
xmlOutObj = xmlapi.XM LHTTPRequest(url,[ xmInObj[, encoding]]) 
 is a convenience method built on top of  
IXMLHTTPRequest  interface
  requires one argument   URL to invoke on the Application Server side. Optionally you may submit 
XML object or string containing well formed XML as parameters envelope to be parse by the URL. The third optional 
argument is the encoding of the parameters' data, which defaults to  utf 8 .  
 expects URL to return 
results as a well formed XML stream. The method may throw exceptions if it fails opening socket to specified URL or if the 
URL times out or returns a non well formed XML. 
 executes synchronously: the first statement after 
 is not executed until  a response from URL has been processed.  
The return value of  
is the 
 containing well formed XML returned by the URL. The whole 
idea of using JSPs or ASPs as simply for the purposes of fetching data is a major departure from the way people typically 
think of URLs.  Unlike regular  Server Pages , JSPs or ASPs called via 
 are not returning HTML to be 
rendered, but raw XML data to be processed by application logic on the client.  
As an example, let's assume you designed a logon screen which contains input elements 
with buttons  OK  and  Cancel  (


The following script, which, according to our practice we place right after closing  tag validates the user via  
 /Examples/Tutorial/EchoLogon.jsp : 

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates Web Design Templates Interland Web Hosting Cheap Web Hosting Java Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.