001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.taglib.theme;
016    
017    import javax.servlet.RequestDispatcher;
018    import javax.servlet.ServletContext;
019    import javax.servlet.http.HttpServletRequest;
020    import javax.servlet.http.HttpServletResponse;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     */
025    public class MetaTagsTag extends com.liferay.taglib.util.IncludeTag {
026    
027            public static void doTag(
028                            ServletContext servletContext, HttpServletRequest request,
029                            HttpServletResponse response)
030                    throws Exception {
031    
032                    doTag(_PAGE, servletContext, request, response);
033            }
034    
035            public static void doTag(
036                            String page, ServletContext servletContext,
037                            HttpServletRequest request, HttpServletResponse response)
038                    throws Exception {
039    
040                    RequestDispatcher requestDispatcher =
041                            servletContext.getRequestDispatcher(page);
042    
043                    requestDispatcher.include(request, response);
044            }
045    
046            @Override
047            protected String getPage() {
048                    return _PAGE;
049            }
050    
051            private static final String _PAGE = "/html/taglib/theme/meta_tags/page.jsp";
052    
053    }