class AbstractFileServlet extends BaseFilteredServlet {

    protected String getSessionId(final HttpServletRequest request,
                                  final SessionProvider sessionProvider) {
        final HttpSession session = request.getSession(true);
        final String clientId = getClientId(request);
        final QueueSession queueSession = sessionProvider.createOrGetSession(session,
                                                                             clientId);

        return queueSession.getSessionId();
    }

}