|
Ajax preparation filter ver. 1.1
This is a Java servlet filter (as per Servlet API 2.3). toAjaxFilter lets you present the response in XML format. Filter lets you reuse the existing content in your Ajax applications for example. Filter intercepts the response and presents it as XML CDATA content, so your JavaScript XML parser will be able to extract HTML code wrapped by XML tags.
For example, suppose your Ajax application needs to obtain HTML content prepared by JSP file and use this content for the updating some div block (via innerHtml property).
In this case the requested JSP file must present own data in XML format. So without the converting it to XHTML you can simply proceed it through this filter.
Try it out: http://www.servletsuite.com/servlets/toajaxflt.htm |