View Javadoc

1   /*
2    * Copyright 2000-2001,2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.apache.jetspeed.portal.portlets;
18  
19  // Jetspeed stuff
20  import org.apache.jetspeed.portal.PortletException;
21  
22  /***
23   * A JSP portlet example.
24   * 
25   * STW: Changed to subclass the GenericMVCPortlet to help
26   * unify the handling of all template based portlets.
27   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
28   * @author <a href="mailto:sgala@apache.org">Santiago Gala</a>
29   * @author <a href="mailto:sweaver@rippe.com">Scott Weaver</a>
30   */
31  public class JspPortlet extends GenericMVCPortlet
32  {
33  
34      public static final String TEMPLATE = "template";
35  
36      /***
37       * STW:  Backward compatibility: set the viewType to "JSP". 
38       * By default the data is non cacheable
39      */
40      public void init() throws PortletException
41      {
42          setCacheable(false);
43          setViewType("JSP");
44          super.init();
45          
46      }
47  
48  
49  }