1 16 17 package org.apache.tester; 18 19 20 import java.io.*; 21 import java.util.*; 22 import javax.servlet.*; 23 import javax.servlet.http.*; 24 25 26 32 33 public class SetLocale01 extends GenericServlet { 34 35 36 38 39 48 public void service(ServletRequest request, ServletResponse response) 49 throws IOException, ServletException { 50 51 response.setContentType("text/plain"); 52 response.setLocale(new Locale("en", "US")); 53 PrintWriter writer = response.getWriter(); 54 writer.println("SetLocale01 PASSED"); 55 while (true) { 56 String message = StaticLogger.read(); 57 if (message == null) 58 break; 59 writer.println(message); 60 } 61 StaticLogger.reset(); 62 63 } 64 65 66 } 67 | Popular Tags |