KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mc > formgenerator > servlets > util > MessageServlet


1 /*
2  * Created on 02 mai. 2004 by the Message Center Team
3  */

4 package mc.formgenerator.servlets.util;
5
6 import java.io.PrintWriter JavaDoc;
7
8 /**
9  * @author sempereb
10  */

11 public class MessageServlet {
12
13     /**
14      * Default constructor
15      */

16     public MessageServlet(){};
17     
18     
19     
20     
21     /**
22      * Display a message to the user via a servlet
23      * @param out: The writer in which we must write
24      * @param message: The message to display
25      */

26     public void writeMessage(PrintWriter JavaDoc out, String JavaDoc message){
27         
28         out.println("<table bgcolor=\"#ddddff\" width=\"100%\" height=\"100%\">");
29         out.println(" <tr valign=\"middle\">");
30         out.println(" <td>");
31         out.println(" <center><b>"+message+"</b></center>");
32         out.println(" </tr>");
33         out.println(" </td>");
34         out.println("</table>");
35     }
36 }
37
Popular Tags