Class LocaleSelectionController
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionController
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
@WebServlet(name="LocaleSelectionController", urlPatterns="/selectLocale") public class LocaleSelectionController extends javax.servlet.http.HttpServletCall this at /selectLocale&selection=[locale_string] For example: /selectLocale&selection=en_US or /selectLocale&selection=esWrite an error to the log (and to DisplayMessage) if the selection is not syntactically valid. Write a warning to the log if the selection code is not one of the selectable Locales from runtime.properties, or if the selection code is not recognized by the system. Set the new Locale in the Session using SelectedLocale and return to the referrer.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringPARAMETER_SELECTION
-
Constructor Summary
Constructors Constructor Description LocaleSelectionController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
PARAMETER_SELECTION
public static final String PARAMETER_SELECTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
-