View Javadoc

1   /*
2    * Copyright 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  package org.apache.pluto.portalImpl.portlet.test;
17  
18  import java.io.IOException;
19  
20  import javax.servlet.GenericServlet;
21  import javax.servlet.ServletException;
22  import javax.servlet.ServletRequest;
23  import javax.servlet.ServletResponse;
24  
25  /***
26   * <B>TODO</B>: Document
27   * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
28   * @version 1.0
29   * @since Mar 9, 2005
30   */
31  public class DispatcherRenderParameterTestServlet extends GenericServlet {
32  
33      public DispatcherRenderParameterTestServlet() {
34  
35      }
36  
37      public void service(ServletRequest req, ServletResponse res)
38      throws ServletException, IOException {
39          String valA = req.getParameter(DispatcherRenderParameterTest.KEY_A);
40          String valB = req.getParameter(DispatcherRenderParameterTest.KEY_B);
41          if(DispatcherRenderParameterTest.VAL_A.equals(valA) && DispatcherRenderParameterTest.VAL_B.equals(valB)) {
42              req.setAttribute(DispatcherRenderParameterTest.RESULT_KEY, Boolean.TRUE);
43          }
44      }
45  
46      public String getServletInfo() {
47          return "Dispather Render Parameter Include Servlet";
48      }
49  
50  }
51