KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > template > jsp > WebManServletConfig


1 package de.webman.template.jsp;
2
3 import java.util.*;
4 import javax.servlet.*;
5
6
7 /**
8  *
9  * Defines a servlet configuration object, which a servlet engine
10  * uses to pass information
11  * to a servlet in order to initialize the servlet.
12  *
13  * <p>The configuration information contains initialization parameters,
14  * which are a set of name/value pairs, and a {@link ServletContext} object,
15  * which gives the servlet information about the server.
16  *
17  * @author Various
18  * @version $Version$
19  *
20  * @see ServletContext
21  *
22  */

23  
24 public class WebManServletConfig implements ServletConfig
25 {
26     private WebManServletContext context = new WebManServletContext();
27     
28     /**
29      * Returns the {@link ServletContext} object that the server
30      * has passed to this servlet. The <code>ServletContext</code>
31      * object is part of the <code>ServletConfig</code> object this
32      * interface defines.
33      *
34      *
35      * @return a {@link ServletContext} object, which
36      * gives the servlet information about how
37      * to interact with the server
38      *
39      * @see ServletContext
40      *
41      */

42
43     public ServletContext getServletContext()
44     {
45         return context;
46     }
47     
48     public String JavaDoc getServletName()
49     {
50         return "Gurke";
51     }
52     
53     /**
54      * Returns a <code>String</code> containing the value of the
55      * named initialization parameter, or <code>null</code> if
56      * the parameter does not exist.
57      *
58      * <p>The value of an initialization parameter is a single
59      * <code>String</code>, which you must interpret.
60      *
61      *
62      * @param name a <code>String</code> containing the name
63      * of the parameter whose value is requested
64      *
65      * @return a <code>String</code> representing the value
66      * of the parameter
67      *
68      */

69
70     public String JavaDoc getInitParameter(String JavaDoc name)
71     {
72         return null;
73     }
74     
75     
76     /**
77      * Returns the names of the servlet's initialization parameters
78      * as an <code>Enumeration</code> of <code>String</code> objects,
79      * or an empty <code>Enumeration</code> if the servlet has
80      * no initialization parameters.
81      *
82      * @return an <code>Enumeration</code> of <code>String</code>
83      * objects containing the names of the servlet's
84      * initialization parameters
85      *
86      *
87      *
88      */

89
90     public Enumeration getInitParameterNames()
91     {
92         return new Hashtable().keys();
93     }
94     
95 }
96
97
98
99
100
101
102
103
104
Popular Tags