public class DispatchServlet extends SecuredServlet {
private final static Logger LOGGER = LoggingManager.getLogger(DispatchServlet.class.getName());
protected void doSecuredPost(UAK uak, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
boolean redirected = ResponseHelper.isRedirected(request);
ContentReference cref = WOJServer.getInstance().getDispatchService().getContentReference(uak, ResponseHelper.getRequestedUrl(request), redirected);
if (CommonSecurityHelper.BROWSER.equals(uak.getComputerId()) && cref.getReferencePath().endsWith(".java")) {
response.setContentType(MimeType.HTML);
} else {
response.setContentType(WOJServer.getInstance().getContentService().getMimeType(cref));
}
WOJServer.getInstance().getContentService().serve(uak, ServletHelper.getLazyOutputStream(response), cref, WOJServer.getInstance().getDispatchService(), redirected);