KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > portlet > taglib > PortletTag


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.portlet.taglib;
10
11 import javax.servlet.ServletRequest JavaDoc;
12 import javax.servlet.jsp.tagext.TagSupport JavaDoc;
13
14 import org.jboss.portal.server.invocation.Invocation;
15 import org.jboss.portal.server.invocation.component.ContextDispatcherInterceptor;
16 import org.jboss.portal.server.servlet.CommandServlet;
17 import org.jboss.portal.server.servlet.ServletCommand;
18
19 /**
20  * Superclass of the portlet tags for the JSR 168
21  * Portlet specification.
22  *
23  * Provides hooks into the portlet environment
24  *
25  * @author <a HREF="mailto:sgwood@ix.netcom.com">Sherman Wood</a>
26  * @version $Revision: 1.3 $
27  *
28  */

29 public class PortletTag extends TagSupport JavaDoc
30 {
31
32    /**
33     * Set up the environment for accessing the portlat environment
34     *
35     * @return The invocation that called the superclasses of this tag
36     */

37    protected Invocation getInvocation()
38    {
39       // Get the invocation
40
ServletRequest JavaDoc req = pageContext.getRequest();
41       ContextDispatcherInterceptor.InvokeNextCommand cmd =
42             (ContextDispatcherInterceptor.InvokeNextCommand)req.getAttribute(ServletCommand.REQ_ATT_KEY);
43       return cmd.getInvocation();
44    }
45 }
46
Popular Tags