GhServlet.java 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package hello;
  2. import javax.servlet.annotation.*;
  3. import com.techempower.gemini.*;
  4. /**
  5. * Main Servlet to be used by the GeminiHello application. Upon
  6. * receiving a request, this Servlet creates a Context object and
  7. * then invokes the Dispatcher. The Dispatcher determines what happens
  8. * next.
  9. *
  10. * @see com.techempower.gemini.InfrastructureServlet
  11. *
  12. * Development history:
  13. * 2012-04-19 - mh - Created
  14. *
  15. * @author mhixson
  16. */
  17. @SuppressWarnings("serial")
  18. @WebServlet(name="Gh", urlPatterns="*")
  19. public class GhServlet
  20. extends InfrastructureServlet
  21. {
  22. //
  23. // Public member methods.
  24. //
  25. /**
  26. * Handles the init call. Starts the Infrastructure. This method -must-
  27. * call super.init().
  28. */
  29. @Override
  30. public void init()
  31. {
  32. // Do not remove the super.init() call below.
  33. super.init();
  34. // Additional initialization is optional.
  35. }
  36. /**
  37. * Gets a GeminiApplication object for this application.
  38. */
  39. @Override
  40. public GhApplication getApplication()
  41. {
  42. return GhApplication.getInstance();
  43. }
  44. /**
  45. * Handles the destroy call. This method -must- call super.destroy().
  46. */
  47. @Override
  48. public void destroy()
  49. {
  50. // Do not remove the super.destroy() call below.
  51. super.destroy();
  52. // Additional clean-up is optional.
  53. }
  54. } // End GhServlet.