1 34 package net.myvietnam.mvncore.info; 35 36 import javax.servlet.ServletContext ; 37 38 public class ServletInfo { 39 40 private String serverInfo = null; 41 private int majorVersion = 0; 42 private int minorVersion = 0; 43 private String servletVersion = null; 44 45 public ServletInfo(ServletContext context) { 46 serverInfo = context.getServerInfo(); 47 majorVersion = context.getMajorVersion(); 48 minorVersion = context.getMinorVersion(); 49 servletVersion = new StringBuffer ().append(majorVersion).append('.').append(minorVersion).toString(); 50 } 51 52 public int getMajorVersion() { 53 return majorVersion; 54 } 55 56 public int getMinorVersion() { 57 return minorVersion; 58 } 59 60 public String getServerInfo() { 61 return serverInfo; 62 } 63 64 public String getServletVersion() { 65 return servletVersion; 66 } 67 } 68 | Popular Tags |