public class SampleServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,IOException {
response.setContentType("text/html;charset=Windows-31J");
PrintWriter out = response.getWriter();
out.println("<html><body>");
Enumeration e = getInitParameterNames();
while(e.hasMoreElements()) {
String paramName = (String)e.nextElement();
String value = getInitParameter(paramName);
out.println(paramName + "=" + value + "<br>");
}
out.println("</body></html>");
}
}
|