1 52 53 54 import com.go.teaservlet.*; 55 import com.go.trove.log.*; 56 import javax.servlet.ServletException ; 57 58 68 public class HelloSampleApp implements Application { 69 70 private Log mLog; 71 private ApplicationConfig mConfig; 72 73 public void init (ApplicationConfig config) throws ServletException { 74 75 mConfig = config; 77 78 mLog = config.getLog(); 80 81 mLog.info("HelloSampleApp started succesfully"); 83 } 84 85 public Object createContext(ApplicationRequest request, 87 ApplicationResponse response) { 88 return new HelloSampleContext(request, response, this); 89 } 90 91 public Class getContextType() { 93 return HelloSampleContext.class; 94 } 95 96 public void destroy() { 97 } 98 } 99 100 101 102 | Popular Tags |