// Get JobData, defines path and used to save servlet output to the repository
final Session s = resourceResolver.adaptTo(Session.class);
if(s == null) {
throw new IOException("Unable to get Session from ResourceResolver " + resourceResolver);
}
final JobData d = storage.createJobData(s);
final String ext = request.getRequestPathInfo().getExtension();
if(ext != null) {
d.setProperty(JobData.PROP_EXTENSION, ext);
}
path = d.getPath();
creationTime = d.getCreationTime();
streamPath = d.getPath() + STREAM_PATH_SUFFIX + (ext == null ? "" : "." + ext);
stream = new SuspendableOutputStream(d.getOutputStream());
response = new BackgroundHttpServletResponse(hsr, stream);
}