Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 36198 invoked from network); 1 Dec 2010 21:48:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Dec 2010 21:48:08 -0000 Received: (qmail 73877 invoked by uid 500); 1 Dec 2010 21:48:06 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 73845 invoked by uid 500); 1 Dec 2010 21:48:06 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 73837 invoked by uid 99); 1 Dec 2010 21:48:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 21:48:06 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 21:47:59 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1PNuWY-00076Q-4X for user@struts.apache.org; Wed, 01 Dec 2010 13:47:38 -0800 Message-ID: <30353656.post@talk.nabble.com> Date: Wed, 1 Dec 2010 13:47:38 -0800 (PST) From: stanlick To: user@struts.apache.org Subject: Re: Internationalization with REST/Convention plug-ins In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: stanlick@gmail.com References: X-Virus-Checked: Checked by ClamAV on apache.org de-rust? That's awesome. I personally am afraid to see what might be lurking under all my rust. There is a struts.convention.package.locators set to the top-level folder in the class hierarchy. One thing that I found interesting though, I added the struts2-config-browser-plugin hoping to get a better look at the runtime and discovered the url .../foo/config-browser/index.action throws a 404. When I removed the index.action I get the following stack trace. You know, all these plug-ins are great, but debugging this or that combination being used is a PITA! java.lang.IllegalArgumentException: The index() is not defined in action class com.opensymphony.xwork2.ActionSupport org.apache.struts2.rest.RestActionInvocation.invokeAction(RestActionInvocation.java:105) com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) com.opensymphony.xwork2.DefaultActionProxy.execute(DefaultActionProxy.java:130) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488) org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) Dave Newton-6 wrote: > > I got caught out by thinking the packages were created in a different > package than I assumed they were, but I don't recall if it was my fault or > if there was a configuration parameter I had forgotten to set or what. > > But just in case it helps, I'll throw it out there. > > Man, I've forgotten a lot of stuff--I really need to de-rust myself :( > > Dave > > On Wed, Dec 1, 2010 at 4:15 PM, wrote: > >> I had a guy ask me why his internationalized properties were not >> accessible >> in his Struts app that was using both the REST and Convention plug-ins. >> My >> first action was to read the docs which did not suggest anything out of >> the >> ordinary, so I through a core app together using this configuration and >> sure >> enough the properties were not found! >> >> He is using >> >> >> >> So I figured an Action called FooController would find >> FooController.properties in the same folder as the FooController.class, >> which as it turns out did *not* work. I set a breakpoint at the top of >> LocalizedTextUtil and the localist contains only the following two files >> [org/apache/struts2/struts-messages, >> com/opensymphony/xwork2/xwork-messages]. Shouldn't this collection >> include >> my FooController.properties on a request http://.../foo? Including a >> message key from struts-messages works fine, however a key from >> FooController.properties returns the key itself as it is not being >> located. >> >> public static String findDefaultText(String aTextName, Locale locale) >> { >> List localList = DEFAULT_RESOURCE_BUNDLES; >> >> for (String bundleName : localList) { >> ResourceBundle bundle = findResourceBundle(bundleName, >> locale); >> if (bundle != null) { >> reloadBundles(); >> try { >> return bundle.getString(aTextName); >> } catch (MissingResourceException e) { >> // ignore and try others >> } >> } >> } >> >> return null; >> } >> > > -- View this message in context: http://old.nabble.com/Internationalization-with-REST-Convention-plug-ins-tp30353436p30353656.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org