Subversion Repositories general

Rev

Rev 1248 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
936 dev 1
package ak.photoalbum.webapp;
2
 
1248 dev 3
import java.io.IOException;
4
import javax.servlet.ServletConfig;
5
import javax.servlet.ServletRequest;
6
import javax.servlet.ServletResponse;
7
import javax.servlet.GenericServlet;
936 dev 8
import javax.servlet.ServletException;
1249 dev 9
import ak.photoalbum.logic.Logic;
936 dev 10
 
11
public class InitServlet
1248 dev 12
  extends GenericServlet
936 dev 13
{
14
  public void init()
15
    throws ServletException
16
  {
1248 dev 17
    try {
18
      ServletConfig config = getServletConfig();
936 dev 19
 
1248 dev 20
      String configPath = "WEB-INF/conf/photos.xml";
21
      if(config.getInitParameter("config") != null)
22
        configPath = config.getInitParameter("config");
23
 
24
      Logic.getLogic().init(new ServletResourceFactory(getServletContext()), configPath);
25
    }
26
    catch(Exception ex) {
27
      throw new ServletException(ex);
28
    }
29
  }
936 dev 30
 
1248 dev 31
  public void service(ServletRequest req, ServletResponse res)
32
    throws ServletException, IOException
33
  {
936 dev 34
  }
35
}
1248 dev 36