JSP and Ajax
Hi,
Is it a good idea, or even possible to dispatch JSP pages from a servlet back to an XmlHttpRequest object, or should we send the information through a writer obtained in the servlet like most examples I have seen?
I want to forward (or actually return an ActionMapping, since I am using Struts) from the servlet to a JSP page like the following:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<select id="selectCompany" size="15">
<c:forEach var="item" items="${companyList}">
<option value="${item.id}">${item.name}</option>
</c:forEach>
</select>
And have this arrive back at the client, and attached via Javascript directly to a div or span on the originating page.
Are there any sources/examples I could reference to better see how to do this? All of the examples I have seen send the information from inside the servlet, and this is very messy.

