session.setAttribute(Constants.QUERY_RESULTS, TableHelper.makeTable(os, q));
String id; synchronized (session) { id = "iql." + qid++; } SessionMethods.setResultsTable(session, id, table);
    public ActionForward execute(ActionMapping mapping,                             ActionForm form,                             HttpServletRequest request,                             HttpServletResponse response)        throws Exception {        HttpSession session = request.getSession();        ServletContext servletContext = session.getServletContext();        ObjectStore os = (ObjectStore) servletContext.getAttribute(Constants.OBJECTSTORE);        Model model = (Model) os.getModel();        IqlQueryForm queryform = (IqlQueryForm) form;        try {            Query q = new IqlQuery(queryform.getQuerystring(),                                   ((Model) os.getModel()).getPackageName()).toQuery();            PagedTable table = TableHelper.makeTable(os, q);            session.setAttribute(Constants.QUERY_RESULTS, TableHelper.makeTable(os, q));            return new ForwardParameters(mapping.findForward("results"))                    .addParameter("table", "results").forward();        } catch (java.lang.IllegalArgumentException e) {            recordError(new ActionMessage("errors.iqlquery.illegalargument",                                          e.getMessage()), request, e, LOG);            return mapping.findForward("iqlQuery");        } catch (ObjectStoreException e) {            ActionErrors errors = new ActionErrors();            if (e instanceof ObjectStoreQueryDurationException) {                recordError(new ActionMessage("errors.query.estimatetimetoolong"), request, e, LOG);            } else {                recordError(new ActionMessage("errors.query.objectstoreerror"), request, e, LOG);            }            return mapping.findForward("iqlQuery");        }    }