KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > core > actions > GetRSSFeedAction


1 package com.sslexplorer.core.actions;
2
3 import javax.servlet.http.HttpServletRequest JavaDoc;
4 import javax.servlet.http.HttpServletResponse JavaDoc;
5
6 import org.apache.struts.action.ActionForm;
7 import org.apache.struts.action.ActionForward;
8 import org.apache.struts.action.ActionMapping;
9
10 import com.sslexplorer.core.actions.AuthenticatedAction;
11 import com.sslexplorer.core.forms.GetRSSFeedForm;
12 import com.sslexplorer.security.SessionInfo;
13
14
15 /**
16  * Implementation of {@link com.sslexplorer.core.actions.AuthenticatedAction}
17  * that retrieves an RSS feed and displays the panel for it.
18  *
19  * @author Brett Smith <a HREF="mailto: brett@3sp.com">&lt;brett@3sp.com&gt;</a>
20  */

21 public class GetRSSFeedAction extends AuthenticatedAction {
22
23     /* (non-Javadoc)
24      * @see com.sslexplorer.core.actions.CoreAction#getNavigationContext(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
25      */

26     public int getNavigationContext(ActionMapping mapping, ActionForm form, HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) {
27         return SessionInfo.MANAGEMENT_CONSOLE_CONTEXT;
28     }
29     
30     /* (non-Javadoc)
31      * @see com.sslexplorer.core.actions.AuthenticatedAction#onExecute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
32      */

33     protected ActionForward onExecute(ActionMapping mapping, ActionForm form, HttpServletRequest JavaDoc request,
34                                       HttpServletResponse JavaDoc response) throws Exception JavaDoc {
35         ((GetRSSFeedForm)form).init(request.getParameter("feed"));
36         return mapping.findForward("display");
37     }
38
39 }
40
Popular Tags