1 28 29 package com.caucho.jsp; 30 31 import com.caucho.vfs.Path; 32 33 import javax.servlet.ServletConfig ; 34 import javax.servlet.ServletException ; 35 import javax.servlet.ServletRequest ; 36 import javax.servlet.ServletResponse ; 37 import javax.servlet.jsp.HttpJspPage ; 38 import java.io.IOException ; 39 40 48 class WrapperPage extends Page { 49 private HttpJspPage _child; 50 private CauchoPage _childPage; 51 52 WrapperPage(HttpJspPage child) 53 throws IOException 54 { 55 _child = child; 56 57 if (_child instanceof CauchoPage) 58 _childPage = (CauchoPage) child; 59 } 60 61 public void init(Path path) 62 throws ServletException 63 { 64 if (_childPage != null) 65 _childPage.init(path); 66 } 67 68 71 final public void init(ServletConfig config) throws ServletException 72 { 73 super.init(config); 74 75 _child.init(config); 76 } 77 78 81 public HttpJspPage getWrappedPage() 82 { 83 return _child; 84 } 85 86 public boolean _caucho_isModified() 87 { 88 if (_childPage != null) 89 return _childPage._caucho_isModified(); 90 else 91 return false; 92 } 93 94 public long _caucho_lastModified() 95 { 96 if (_childPage != null) 97 return _childPage._caucho_lastModified(); 98 else 99 return 0; 100 } 101 102 105 public void service(ServletRequest request, ServletResponse response) 106 throws IOException , ServletException 107 { 108 _child.service(request, response); 109 } 110 111 114 final public void destroy() 115 { 116 try { 117 setDead(); 118 119 _child.destroy(); 120 } catch (Exception e) { 121 } 122 } 123 } 124 | Popular Tags |