KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > portalImpl > portlet > test > DispatcherRenderParameterTestServlet


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 JavaDoc;
19
20 import javax.servlet.GenericServlet JavaDoc;
21 import javax.servlet.ServletException JavaDoc;
22 import javax.servlet.ServletRequest JavaDoc;
23 import javax.servlet.ServletResponse JavaDoc;
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 JavaDoc {
32
33     public DispatcherRenderParameterTestServlet() {
34
35     }
36
37     public void service(ServletRequest JavaDoc req, ServletResponse JavaDoc res)
38     throws ServletException JavaDoc, IOException JavaDoc {
39         String JavaDoc valA = req.getParameter(DispatcherRenderParameterTest.KEY_A);
40         String JavaDoc 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 JavaDoc getServletInfo() {
47         return "Dispather Render Parameter Include Servlet";
48     }
49
50 }
51
52
Popular Tags