001 package railo.runtime.tag; 002 003 import railo.runtime.exp.PageException; 004 import railo.runtime.ext.tag.BodyTagImpl; 005 import railo.runtime.op.Caster; 006 007 public final class Setting extends BodyTagImpl { 008 009 private boolean hasBody; 010 011 /** set the value requesttimeout 012 * @param requesttimeout value to set 013 **/ 014 public void setRequesttimeout(double requesttimeout) { 015 pageContext.setRequestTimeout((long)(requesttimeout*1000)); 016 } 017 018 /** set the value showdebugoutput 019 * Yes or No. When set to No, showDebugOutput suppresses debugging information that would 020 * otherwise display at the end of the generated page.Default is Yes. 021 * @param showdebugoutput value to set 022 **/ 023 public void setShowdebugoutput(boolean showdebugoutput) { 024 pageContext.getDebugger().setOutput(showdebugoutput); 025 } 026 027 /** set the value enablecfoutputonly 028 * Yes or No. When set to Yes, cfsetting blocks output of HTML that resides outside cfoutput tags. 029 * @param enablecfoutputonly value to set 030 * @throws PageException 031 **/ 032 public void setEnablecfoutputonly(Object enablecfoutputonly) throws PageException { 033 if(enablecfoutputonly instanceof String && 034 Caster.toString(enablecfoutputonly).trim().equalsIgnoreCase("reset")) { 035 pageContext.setCFOutputOnly((short)0); 036 } 037 else { 038 pageContext.setCFOutputOnly(Caster.toBooleanValue(enablecfoutputonly)); 039 } 040 } 041 042 /** 043 * @deprecated this method is replaced by the method <code>setEnablecfoutputonly(Object enablecfoutputonly)</code> 044 * @param enablecfoutputonly 045 */ 046 public void setEnablecfoutputonly(boolean enablecfoutputonly) { 047 pageContext.setCFOutputOnly(enablecfoutputonly); 048 } 049 050 /** 051 * @see javax.servlet.jsp.tagext.Tag#doStartTag() 052 */ 053 public int doStartTag() { 054 return EVAL_BODY_INCLUDE; 055 } 056 057 /** 058 * @see javax.servlet.jsp.tagext.Tag#doEndTag() 059 */ 060 public int doEndTag() { 061 return EVAL_PAGE; 062 } 063 064 /** 065 * sets if tag has a body or not 066 * @param hasBody 067 */ 068 public void hasBody(boolean hasBody) { 069 this.hasBody=hasBody; 070 } 071 072 }