1 /*--------------------------------------------------------------------------
2 * Copyright 2007 utgenome.org
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 // utgb-core Project
18 //
19 // Hello.java
20 // Since: Oct 4, 2007
21 //
22 // $URL$
23 // $Author$
24 //--------------------------------------
25 package org.utgenome.gwt.utgb.server.app;
26
27 import java.io.IOException;
28
29 import javax.servlet.ServletException;
30 import javax.servlet.http.HttpServletRequest;
31 import javax.servlet.http.HttpServletResponse;
32
33 import org.utgenome.gwt.utgb.server.RequestHandlerBase;
34
35 /**
36 * Request handler that simply returns hello + name
37 * @author leo
38 *
39 */
40 public class Hello extends RequestHandlerBase
41 {
42 /**
43 *
44 */
45 private static final long serialVersionUID = 1L;
46 private String name = "";
47 private int year = 2005;
48
49 public Hello()
50 {}
51
52 public void handle(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
53 {
54 response.getWriter().println("Hello! " + name + ": " + year);
55 }
56
57 public String getName()
58 {
59 return name;
60 }
61
62 public void setName(String name)
63 {
64 this.name = name;
65 }
66
67 public int getYear()
68 {
69 return year;
70 }
71
72 public void setYear(int year)
73 {
74 this.year = year;
75 }
76
77
78
79
80
81
82
83 }
84
85
86
87