KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > GuestbookActionServlet


1 package example;
2
3 import java.util.*;
4 import javax.servlet.*;
5
6 import org.apache.struts.action.ActionServlet;
7
8 public class GuestbookActionServlet extends ActionServlet {
9     
10     static final String JavaDoc GUESTBOOK_KEY = "guestbook";
11     
12     public void init(ServletConfig scfg) throws ServletException {
13         super.init(scfg);
14         
15         ServletContext sctx = scfg.getServletContext();
16         
17         // Add application specific global objects
18
sctx.setAttribute(GUESTBOOK_KEY, new ArrayList());
19     }
20 }
21
Popular Tags