1 2 3 import javax.servlet.http.*; 4 import javax.servlet.ServletException ; 5 import de.webman.util.registry.Registry; 6 import de.webman.util.registry.RegistryException; 7 import java.io.IOException ; 8 import java.io.PrintStream ; 9 10 17 public class InitServlet 18 extends HttpServlet 19 { 20 21 22 25 public void init() { 26 String basedir = getServletContext().getRealPath("/"); 27 28 try { 29 Registry.getInstance() 30 .setConfiguration(basedir, "WEB-INF/classes/registry.xml"); 31 } 32 catch (Exception re) { 33 PrintStream stderr = System.err; 34 stderr.println(re); 35 } 36 } 37 38 45 public void doGet(HttpServletRequest req, HttpServletResponse res) 46 throws ServletException , IOException 47 { 48 49 } 50 } 51 | Popular Tags |