@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,
IOException
{
springContext = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
ImageWriter imageWriter = (ImageWriter) springContext.getBean("imageWriter");
RenderedImage image = imageWriter.read(request.getParameter("img"));
// show a 404 page
if (image == null)
{
httpError(NOTFOUND, response);