DisplayChartServlet.java |
1 /** 2 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved. 3 * 4 * This library is free software; you can redistribute it and/or modify it under 5 * the terms of the GNU Lesser General Public License as published by the Free 6 * Software Foundation; either version 2.1 of the License, or (at your option) 7 * any later version. 8 * 9 * This library is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 12 * details. 13 */ 14 15 package com.liferay.portal.servlet; 16 17 import com.liferay.portal.util.PortalUtil; 18 19 import java.io.IOException; 20 21 import javax.servlet.ServletException; 22 import javax.servlet.http.HttpServletRequest; 23 import javax.servlet.http.HttpServletResponse; 24 25 import org.jfree.chart.servlet.DisplayChart; 26 27 /** 28 * <a href="DisplayChartServlet.java.html"><b><i>View Source</i></b></a> 29 * 30 * @author Samuel Kong 31 */ 32 public class DisplayChartServlet extends DisplayChart { 33 34 public void service( 35 HttpServletRequest request, HttpServletResponse response) 36 throws IOException, ServletException { 37 38 try { 39 super.service(request, response); 40 } 41 catch (Exception e) { 42 PortalUtil.sendError( 43 HttpServletResponse.SC_NOT_FOUND, e, request, response); 44 } 45 } 46 47 }