public abstract class AbstractNlsResourceBundleJavaScriptServlet extends AbstractLoggableHttpServlet
HttpServlet that dynamically generates some JavaScript containing the content of
NlsBundles and ResourceBundles for the users locale.| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
static String |
URL_PARAM_NAME
The query string for
URL_PATH to query the bundle name as GET-parameter. |
static String |
URL_PARAM_NAME_QUERY
The query string for
URL_PATH to query the bundle name as GET-parameter. |
static String |
URL_PATH
The URL path under which the bundle can be loaded.
|
| Constructor and Description |
|---|
AbstractNlsResourceBundleJavaScriptServlet()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected String |
escapeBundleKey(String key) |
protected String |
escapeBundleName(String name) |
protected void |
writeBundle(PrintWriter writer,
String name,
ResourceBundle bundle)
This method writes the given
ResourceBundle to the writer. |
getLoggerdoDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceprivate static final long serialVersionUID
public static final String URL_PATH
public static final String URL_PARAM_NAME
URL_PATH to query the bundle name as GET-parameter.public static final String URL_PARAM_NAME_QUERY
URL_PATH to query the bundle name as GET-parameter.public AbstractNlsResourceBundleJavaScriptServlet()
protected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void writeBundle(PrintWriter writer, String name, ResourceBundle bundle)
ResourceBundle to the writer.writer - is the PrintWriter to use.name - is the bundle name.bundle - is the ResourceBundle for the users locale to write to the given writer.protected String escapeBundleKey(String key)
key - is the key to escape for JavaScript.protected String escapeBundleName(String name)
name - is the bundle name to escape for JavaScript.Copyright © 2001–2016 mmm-Team. All rights reserved.