Okay, I may have this all wrong, and then that's my problem.  I have an
application that was developed under the 2.0 branch that I recently migrated
to 1.4.  This application uses a servlet to handle requests for Jasper
Reports, and under 2.0 everything worked great.  I store the report request
in the user's Session, and retrieve it in the JasperReportServlet to look up
the request.  In my JasperReportServlet I was doing:

 

public final void doGet(final HttpServletRequest servletRequest, final
HttpServletResponse servletResponse) throws ServletException, IOException

{

      String requestId =
servletRequest.getParameter(ReportingConstants.PARAMETER_NAME_REPORT_REQUEST
);

      ReportRequest reportReq = null;

      MySession session = (MySession)Session.get();

      reportReq = session.getReportRequest(requestId);

 

      // handle report request, etc.

}

 

However, in 1.4 when I do Session.get() from my JasperReportServlet I am
getting the error java.lang.IllegalStateException: you can only locate or
create sessions in the context of a request cycle.

 

So, can I no longer get an object from my wicket Session from a non-wicket
Servlet?  I've been looking all over, and can't seem to find the right
answer.  Thanks for any help.

 

Regards,

Matthew.

 

Reply via email to