Does anyone see anything wrong w/ the following configuration w/ the files
below. The line ...
$i18n.getValue("main.title")
doesn't get the value out of the VelocityContext for the given key.

Any help much appreciated.

--- Catalog.java ---
public class Catalog extends WebWorkVelocityServlet {

   private HashMap hmap;
   private VelocityContext ctx;

   private static Logger log = new Logger();

   public Catalog() {

      log.info(Catalog.class, "entering Catalog");

      hmap = new HashMap();
      ctx = new VelocityContext();

      hmap.put("main.title", "myTitle");
      hmap.put("footer.copyright", "myCopy");

      ctx.put("i18n", hmap);
   }

   public String getValue(String key) {
      if (hmap.containsKey(key)) {
         log.info(Catalog.class, "got key - " + key);
         return (String) hmap.get(key);
      }

      return "Key not found!";
   }
}

--- webwork.properties ---
# Comma separated list of package prefixes for Java actions.
webwork.action.packages=webwork.action.standard, com.neuroquest.cais.web

# Configuration
webwork.configuration=webwork.config.DefaultConfiguration
webwork.configuration.properties=views,webwork,webwork/default,acais

file.resource.loader.path = /

--- web.xml ---
   <servlet>
      <servlet-name>Catalog</servlet-name>
      <servlet-class>com.neuroquest.cais.web.tools.Catalog</servlet-class>
   </servlet>


_______________________________________________
Webwork-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webwork-user

Reply via email to