use of org.eclipse.scout.rt.server.context.ServerRunContext in project scout.rt by eclipse.
the class DiagnosticServlet method doGet.
@Override
protected void doGet(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws ServletException, IOException {
if (Subject.getSubject(AccessController.getContext()) == null) {
servletResponse.sendError(HttpServletResponse.SC_FORBIDDEN);
return;
}
lazyInit(servletRequest, servletResponse);
createServletRunContext(servletRequest, servletResponse).run(new IRunnable() {
@Override
public void run() throws Exception {
ServerRunContext serverRunContext = ServerRunContexts.copyCurrent();
serverRunContext.withUserAgent(UserAgents.createDefault());
serverRunContext.withSession(lookupServerSessionOnHttpSession(Sessions.randomSessionId(), serverRunContext.copy()));
invokeDiagnosticService(serverRunContext);
}
}, ServletExceptionTranslator.class);
}
Aggregations