struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Ventura <vent...@cit.com.br>
Subject Display key itself when not found in MessageResources
Date Tue, 17 Jun 2003 14:02:54 GMT
Been searching the archives, but with little luck. I even found a
thread about this
(http://www.mail-archive.com/struts-user@jakarta.apache.org/msg68779.html),
but it didn't have an answer, so I'm reposting.

If I use <bean:message key="foo"/> and "foo" is not present
in my application resources file, the tag throws an exception
(stack trace at the end). I wanted it to display "foo" itself.

Can I create a class that extends PropertyResourceBundle (or
whatever) that does not throw a MissingResourceException, and
specify it in my web.xml file like this?

...
    <param-name>application</param-name>
    <param-value>com.foo.MySuperDuperResourceBundle</param-value>
...

Unfortunately, I'm stuck with Struts 1.0.2 for the time being :(

[]'s
- ventura

P.S. Here's the exception stack trace if anyone cares.

javax.servlet.jsp.JspException: Missing message for key Minhas Atividades
 at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
 at org.apache.jsp.menu$jsp._jspService(menu$jsp.java:1192)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
(Does anyone really cares about the rest :))) ?


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message