1 5 11 package com.opensymphony.webwork.views.jsp; 12 13 import com.opensymphony.webwork.components.Include; 14 15 import javax.servlet.http.HttpServletRequest ; 16 import javax.servlet.http.HttpServletResponse ; 17 import javax.servlet.jsp.JspException ; 18 19 20 27 public class IncludeTag extends ParametereizedBodyTagSupport { 28 protected Include include; 29 protected String value; 30 31 public int doEndTag() throws JspException { 32 include.addAllParameters(getParameters()); 33 include.end(pageContext.getOut()); 34 35 return EVAL_PAGE; 36 } 37 38 public int doStartTag() throws JspException { 39 include = new Include(getStack(), 40 (HttpServletRequest ) pageContext.getRequest(), 41 (HttpServletResponse ) pageContext.getResponse()); 42 include.setValue(value); 43 include.start(pageContext.getOut()); 44 45 return EVAL_BODY_BUFFERED; 46 } 47 48 public void setValue(String value) { 49 this.value = value; 50 } 51 } 52 | Popular Tags |