001 package railo.runtime.tag; 002 003 import railo.runtime.exp.ExpressionException; 004 import railo.runtime.ext.tag.TagImpl; 005 006 /** 007 * Executes a Java servlet on a JRun engine. This tag is used in conjunction with the 008 * cfserletparam tag, which passes data to the servlet. 009 * 010 * 011 * 012 **/ 013 public final class Servlet extends TagImpl { 014 015 private boolean debug; 016 private String code; 017 private boolean writeoutput; 018 private double timeout; 019 private String jrunproxy; 020 021 022 /** 023 * constructor for the tag class 024 * @throws ExpressionException 025 **/ 026 public Servlet() throws ExpressionException { 027 throw new ExpressionException("tag cfservlet is deprecated"); 028 } 029 030 /** set the value debug 031 * Boolean specifying whether additional information about the JRun connection status and 032 * activity is to be written to the JRun error log 033 * @param debug value to set 034 **/ 035 public void setDebug(boolean debug) { 036 this.debug=debug; 037 } 038 039 /** set the value code 040 * The class name of the Java servlet to execute. 041 * @param code value to set 042 **/ 043 public void setCode(String code) { 044 this.code=code; 045 } 046 047 /** set the value writeoutput 048 * @param writeoutput value to set 049 **/ 050 public void setWriteoutput(boolean writeoutput) { 051 this.writeoutput=writeoutput; 052 } 053 054 /** set the value timeout 055 * Specifies how many seconds JRun waits for the servlet to complete before timing out. 056 * @param timeout value to set 057 **/ 058 public void setTimeout(double timeout) { 059 this.timeout=timeout; 060 } 061 062 /** set the value jrunproxy 063 * @param jrunproxy value to set 064 **/ 065 public void setJrunproxy(String jrunproxy) { 066 this.jrunproxy=jrunproxy; 067 } 068 069 070 @Override 071 public int doStartTag() { 072 return SKIP_BODY; 073 } 074 075 @Override 076 public int doEndTag() { 077 return EVAL_PAGE; 078 } 079 080 @Override 081 public void release() { 082 super.release(); 083 debug=false; 084 code=""; 085 writeoutput=false; 086 timeout=0d; 087 jrunproxy=""; 088 } 089 }