KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > IndexAction


1 package example;
2
3 import java.util.*;
4 import javax.servlet.http.*;
5 import org.apache.struts.action.*;
6
7 public class IndexAction extends GuestbookAction {
8     public ActionForward execute(
9             ActionMapping mapping,
10             ActionForm form,
11             HttpServletRequest req,
12             HttpServletResponse resp) throws Exception JavaDoc {
13
14         List snapShot;
15         
16         synchronized (getGuestbook()) {
17             snapShot = (List) getGuestbook().clone();
18         }
19         req.setAttribute("guestbook", snapShot);
20         
21         return mapping.findForward("success");
22     }
23 }
24
Popular Tags