org.spiffyui.server
Class JSLocaleServlet

java.lang.Object
  extended by HttpServlet
      extended by org.spiffyui.server.JSLocaleServlet

public class JSLocaleServlet
extends HttpServlet

This servlet redirect to a specific locale version of the JQuery date picker, date.js or returns the best match locale.


Constructor Summary
JSLocaleServlet()
           
 
Method Summary
protected  java.util.Locale getBestMatchLocale(HttpServletRequest request, HttpServletResponse response, ServletContext context)
          Override this method to use customized algorithm for determining best match locale.
 void service(HttpServletRequest request, HttpServletResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSLocaleServlet

public JSLocaleServlet()
Method Detail

service

public void service(HttpServletRequest request,
                    HttpServletResponse response)
             throws ServletException,
                    java.io.IOException
Throws:
ServletException
java.io.IOException

getBestMatchLocale

protected java.util.Locale getBestMatchLocale(HttpServletRequest request,
                                              HttpServletResponse response,
                                              ServletContext context)
                                       throws ServletException
Override this method to use customized algorithm for determining best match locale.

Parameters:
request - - the HttpServletRequest
response - - the HttpServletResponse
context - - the ServletContext
Returns:
the best match Locale
Throws:
ServletException - thrown in case of error