KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > servlet > AboutHandler


1 /*
2  * Copyright 2005 Joe Walker
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.directwebremoting.servlet;
17
18 import java.io.IOException JavaDoc;
19 import java.io.PrintWriter JavaDoc;
20
21 import javax.servlet.http.HttpServletRequest JavaDoc;
22 import javax.servlet.http.HttpServletResponse JavaDoc;
23
24 import org.directwebremoting.extend.Handler;
25 import org.directwebremoting.util.MimeConstants;
26
27 /**
28  * A handler for requests to create a debug index page
29  * @author Joe Walker [joe at getahead dot ltd dot uk]
30  */

31 public class AboutHandler implements Handler
32 {
33     /* (non-Javadoc)
34      * @see org.directwebremoting.Handler#handle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
35      */

36     public void handle(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) throws IOException JavaDoc
37     {
38         response.setContentType(MimeConstants.MIME_HTML);
39         PrintWriter JavaDoc out = response.getWriter();
40         out.print("<html><head><title>DWR - Easy Ajax for Java</title></head><body>");
41         out.print("<h1 style='font-size:100%;font-weight:normal;'>This site is using <a HREF='http://getahead.org/dwr'>DWR - Easy Ajax for Java</a>.");
42         out.print("</body></html>");
43     }
44 }
45
Popular Tags