1 package com.quadcap.http.servlets.jsp; 2 3 40 41 import java.io.IOException ; 42 import java.io.PrintWriter ; 43 44 import org.xml.sax.AttributeList ; 45 46 51 public class TagDirInclude extends TagJsp { 52 public TagDirInclude() {} 53 54 public TagDirInclude(TagContext context) { 55 super(context); 56 } 57 58 public TagInstance makeInstance(TagContext context) { 59 return new TagDirInclude(context); 60 } 61 62 public String getTagName() { return tagName; } 63 64 public void doStartTag(String tagName, AttributeList attributes) 65 throws JspException 66 { 67 this.tagName = tagName; 68 String file = attributes.getValue("file"); 69 if (file == null) { 70 throw new JspException("No 'file' attribute specified for" + 71 " include directive"); 72 } 73 try { 74 context.includeFile(file); 75 } catch (Exception e) { 76 throw new JspException(e); 77 } 78 } 79 } 80 81 | Popular Tags |