📄 cmsjsptaginclude.java
字号:
/*
* File : $Source: /usr/local/cvs/opencms/src/com/opencms/flex/jsp/Attic/CmsJspTagInclude.java,v $
* Date : $Date: 2003/05/13 13:18:20 $
* Version: $Revision: 1.22.2.1 $
*
* This library is part of OpenCms -
* the Open Source Content Mananagement System
*
* Copyright (C) 2002 - 2003 Alkacon Software (http://www.alkacon.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* For further information about Alkacon Software, please see the
* company website: http://www.alkacon.com
*
* For further information about OpenCms, please see the
* project website: http://www.opencms.org
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.opencms.flex.jsp;
import com.opencms.core.CmsException;
import com.opencms.core.I_CmsConstants;
import com.opencms.file.CmsResource;
import com.opencms.flex.cache.CmsFlexController;
import com.opencms.launcher.CmsXmlLauncher;
import com.opencms.template.CmsXmlTemplate;
import com.opencms.workplace.I_CmsWpConstants;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.BodyTagSupport;
/**
* Used to include another OpenCms managed resource in a JSP.<p>
*
* @author Alexander Kandzior (a.kandzior@alkacon.com)
* @version $Revision: 1.22.2.1 $
*/
public class CmsJspTagInclude extends BodyTagSupport implements I_CmsJspTagParamParent {
// Attribute member variables
private String m_target = null;
private String m_suffix = null;
private String m_property = null;
private String m_attribute = null;
private String m_element = null;
/** Hashmap to save paramters to the include in */
private HashMap m_parameterMap = null;
/** Debugging on / off */
private static final boolean DEBUG = false;
/** URI of the bodyloader XML file in the OpenCms VFS*/
public final static String C_BODYLOADER_URI = "/system/shared/bodyloader.html";
/**
* Sets the include page target.<p>
*
* @param target the target to set
*/
public void setPage(String target) {
if (target != null) {
m_target = target.toLowerCase();
}
}
/**
* Returns the include page target.<p>
*
* @return the include page target
*/
public String getPage() {
return m_target!=null?m_target:"";
}
/**
* Sets the file, same aus using <code>setPage()</code>
*
* @param target the file to set
* @see #setPage(String)
*/
public void setFile(String file) {
setPage(file);
}
/**
* Returns the value of <code>getPage()</code>.<p>
*
* @return the value of <code>getPage()</code>
* @see #getPage()
*/
public String getFile() {
return getPage();
}
/**
* Returns the property.<p>
*
* @return the property
*/
public String getProperty() {
return m_property!=null?m_property:"";
}
/**
* Sets the property.<p>
*
* @param property the property to set
*/
public void setProperty(String property) {
if (property != null) {
this.m_property = property;
}
}
/**
* Returns the attribute.<p>
*
* @return the attribute
*/
public String getAttribute() {
return m_attribute!=null?m_attribute:"";
}
/**
* Sets the attribute.<p>
*
* @param attribute the attribute to set
*/
public void setAttribute(String attribute) {
if (attribute != null) {
this.m_attribute = attribute;
}
}
/**
* Returns the suffix.<p>
*
* @return the suffix
*/
public String getSuffix() {
return m_suffix!=null?m_suffix:"";
}
/**
* Sets the suffix.<p>
*
* @param suffix the suffix to set
*/
public void setSuffix(String suffix) {
if (suffix != null) {
this.m_suffix = suffix.toLowerCase();
}
}
/**
* Returns the element.<p>
*
* @return the element
*/
public String getElement() {
return m_element;
}
/**
* Sets the element.<p>
*
* @param element the element to set
*/
public void setElement(String element) {
if (element != null) {
this.m_element = element;
}
}
/**
* @see javax.servlet.jsp.tagext.Tag#release()
*/
public void release() {
super.release();
m_target = null;
m_suffix = null;
m_property = null;
m_element = null;
m_parameterMap = null;
}
/**
* @return <code>EVAL_BODY_BUFFERED</code>
* @see javax.servlet.jsp.tagext.Tag#doStartTag()
*/
public int doStartTag() throws JspException {
return EVAL_BODY_BUFFERED;
}
/**
* @return <code>EVAL_PAGE</code>
* @see javax.servlet.jsp.tagext.Tag#doEndTag()
*/
public int doEndTag() throws JspException {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -