You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/06/28 16:55:22 UTC
DO NOT REPLY [Bug 10322] New: -
Problems with LookupDispatchAction and other locals
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10322
Problems with LookupDispatchAction and other locals
Summary: Problems with LookupDispatchAction and other locals
Product: Struts
Version: 1.1 Beta 1
Platform: PC
OS/Version: Windows NT/2K
Status: UNCONFIRMED
Severity: Major
Priority: Other
Component: Standard Actions
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: h.schmidt@mkg-bank.de
Hi,
I tried LookupDispatchAction and have Problems with other locals.
First I use only the Default ApplicationResources.properties with English
button-labels and everything runs well.
Then I add an ApplicationResources_de.properties with German button-labels - my
local is 'de'. After a button-click I got always the following error:
java.lang.NullPointerException at
org.apache.commons.logging.impl.Jdk14Logger.warn(Jdk14Logger.java:290) at
org.apache.struts.action.RequestProcessor.processException
(RequestProcessor.java:491) at
org.apache.struts.action.RequestProcessor.processActionPerform
(RequestProcessor.java:439) at
org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:264) at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247) at
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193) at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter
(MonitorFilter.java:223) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:213)
...
So I debugged the code and I see in the Class LookupDispatchAction in the
Method perform (line:214) the following code, where the lookupMap is filled:
Iterator iter = keyMethodMap.keySet().iterator();
while (iter.hasNext()) {
String key = (String) iter.next();
String text = resources.getMessage(key);
if ((text != null) && !lookupMap.containsKey(text)) {
lookupMap.put(text, key);
}
}
In my Test the Methode perform fill the lookupMap with the English Default-
labels (cause the Method resources.getMassage set the local to ""). So it
always compares the German button-labels with the English Default-labels which
never compares and an NullPointerException is thrown.
I hope i'm right and this is a bug.
Otherwise, if i'm wrong, i would thank you if you can show me my Error in
handle the LookupDispatchAction.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>