001 package railo.runtime.tag; 002 003 import railo.runtime.exp.PageException; 004 import railo.runtime.ext.tag.TagImpl; 005 import railo.runtime.op.Caster; 006 007 /** 008 * Used to: Abort the processing of the currently executing CFML custom tag, exit the template 009 * within the currently executing CFML custom tag and reexecute a section of code within the currently 010 * executing CFML custom tag 011 * 012 **/ 013 public final class Forward extends TagImpl { 014 015 private String template; 016 017 /** 018 * @param template The template to set. 019 */ 020 public void setTemplate(String template) { 021 this.template = template; 022 } 023 024 /** 025 * @see javax.servlet.jsp.tagext.Tag#doStartTag() 026 */ 027 public int doStartTag() throws PageException { 028 try { 029 pageContext.forward(template); 030 } 031 catch (Exception e) { 032 throw Caster.toPageException(e); 033 } 034 035 /*RequestDispatcher disp = pageContext. getHttpServletRequest().getRequestDispatcher(template); 036 try { 037 disp.forward(pageContext. getHttpServletRequest(),pageContext. getHttpServletResponse()); 038 } 039 catch (Exception e) { 040 throw Caster.toPageException(e); 041 }*/ 042 return SKIP_BODY; 043 } 044 045 046 }