org.displaytag.properties
Class DisplayPropertiesLoaderServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.displaytag.properties.DisplayPropertiesLoaderServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

Deprecated. this servlet doesn't support i18n. The recommended way to load custom properties is adding a displaytag.properties file in your classpath. This will also load locale specific properties (for example displaytag_IT.properties) when needed.

public class DisplayPropertiesLoaderServlet
extends javax.servlet.http.HttpServlet

Servlet which loads a user supplied properties file for the display taglibrary.

You probably do not need to use this servlet. For most cases, you should simply add a displaytag.properties file to your system, to the same effect, and not have to configure this servlet. If you have both a displaytag.properties, and you configure this servlet, the properties in the property file specified here will override the properties in the displaytag.properties.

To set a default properties for a whole web application configure this servlet in web.xml and set a "properties.filename" parameter with the path to the properties file, relative to the web application root (example: "WEB-INF/display.properties").

The original properties file is still loaded and used when any of the parameters is missing

Sample Web.xml entry:

     <servlet id="DisplayPropertiesLoaderServlet">
         <servlet-name>DisplayPropertiesLoaderServlet</servlet-name>
         <display-name>DisplayPropertiesLoaderServlet</display-name>
         <description>displaytag initialization servlet</description>
         <servlet-class>org.displaytag.properties.DisplayPropertiesLoaderServlet</servlet-class>
         <init-param>
             <param-name>properties.filename</param-name>
             <param-value>WEB-INF/display.properties</param-value>
         </init-param>
         <load-on-startup>1</load-on-startup>
     </servlet>
 

Version:
$Revision: 1.15 $ ($Author: fgiust $)
Author:
Fabrizio Giustina, rapruitt
See Also:
Serialized Form

Field Summary
static java.lang.String PROPERTIES_PARAMETER
          Deprecated. name of the parameter containing the properties file path.
 
Constructor Summary
DisplayPropertiesLoaderServlet()
          Deprecated.  
 
Method Summary
 void init(javax.servlet.ServletConfig servletConfig)
          Deprecated. Init: retrieve the confiuration parameter and set the user file name in org.displaytag.tags.TableProperties.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_PARAMETER

public static final java.lang.String PROPERTIES_PARAMETER
Deprecated. 
name of the parameter containing the properties file path.

See Also:
Constant Field Values
Constructor Detail

DisplayPropertiesLoaderServlet

public DisplayPropertiesLoaderServlet()
Deprecated. 
Method Detail

init

public final void init(javax.servlet.ServletConfig servletConfig)
                throws javax.servlet.ServletException
Deprecated. 
Init: retrieve the confiuration parameter and set the user file name in org.displaytag.tags.TableProperties.

Parameters:
servletConfig - ServletConfig
Throws:
javax.servlet.ServletException - generic exception
See Also:
Servlet.init(ServletConfig)


Copyright © 2002-2005 the Displaytag team. All Rights Reserved.