com.knowgate.http
Class HttpQueryServlet

java.lang.Object
  extended by HttpServlet
      extended by com.knowgate.http.HttpQueryServlet

public class HttpQueryServlet
extends HttpServlet

Get Query By Form results

See Also:
QueryByForm

Constructor Summary
HttpQueryServlet()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Get Query By Form results throught response output stream.
 void init()
          Initialize Servlet Parameters Take Database Driver, Conenction URL and User from /WEB-INF/web.xml.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpQueryServlet

public HttpQueryServlet()
Method Detail

init

public void init()
          throws ServletException

Initialize Servlet Parameters

Take Database Driver, Conenction URL and User from /WEB-INF/web.xml.
If any parameter is not found then look it up at hipergate.cnf Properties file using Environment singleton.

Throws:
ServletException
UnavailableException - If jdbcDriverClassName parameter is not found and driver property at hipergate.cnf is not found or if jdbcURL parameter is not found and dburl property at hipergate.cnf is not found.
See Also:
Environment

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws java.io.IOException,
                  java.io.FileNotFoundException,
                  ServletException

Get Query By Form results throught response output stream.

Parameters:
queryspec - Name of XML file containing the Query Specification
columnlist - List of comma separated column names to retrieve
where - SQL WHERE clause to apply
order - by SQL ORDER BY clause to apply
showas - Output format. One of { "CSV" (comma separated), "TSV" (tabbed separated), "XLS" (Excel) }
Throws:
java.io.IOException
java.io.FileNotFoundException
ServletException