Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85991DDE5 for ; Fri, 28 Sep 2012 17:28:11 +0000 (UTC) Received: (qmail 3034 invoked by uid 500); 28 Sep 2012 17:28:09 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 2958 invoked by uid 500); 28 Sep 2012 17:28:08 -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 99198 invoked by uid 99); 28 Sep 2012 16:57:58 -0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=FSL_RCVD_USER,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of jdtommy@gmail.com) Date: Fri, 28 Sep 2012 09:57:32 -0700 (PDT) From: jdtommy To: user@struts.apache.org Message-ID: <1348851452000-5710681.post@n5.nabble.com> Subject: using annotations with struts 2 in jboss not finding actions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org The application is using Jboss and has an ear file which contains an war file and a jar file. The war contians all our web pages. The action classes which I have annotated are in the jar file that is in the ear. From my googleing I have setup my struts.xml file with the following constants: Jboss container starts up fine, but my action is not loaded. I have downloaded the source for the convention plugin to see what it is using to find the action classes and it seems to only look at the war file for action classes when it scans. Is there a way to get it to look in the jar file that contains the actions class when it scans foe the annotated action classes? file structure:
-application.ear
  |--application.war
  |--aplication_logic_actions.jar *<--- this contains the action classes which are annotated* I have debugged the code for the convention plugin and here is where I see my problem. In the *PackageBasedActionConfigBuilder* class and the *buildUrlSet()* method it has this line of code: UrlSet urlSet = new UrlSet(classLoaderInterface, this.fileProtocols); after this code I get about 200 + urls. It then goes through this code: if (excludeParentClassLoader) { This condiftion block removes all my urls since they are all from jboss I guess and I have *excludeParentClassLoader* set to true. It then hits this code: urlSet = urlSet.includeClassesUrl(classLoaderInterface); after this I get one url in my urlset: > file:/C:/evolution/trunk/powersports/jboss/server/dms/deploy/http-invoker.sar/invoker.war=file:/C:/evolution/trunk/powersports/jboss/server/dms/deploy/http-invoker.sar/invoker.war Now it finally gets to the part that has the jar incllude regex List rawIncludedUrls = urlSet.getUrls(); Set includeUrls = new HashSet(); boolean[] patternUsed = new boolean[includeJars.length]; for (URL url : rawIncludedUrls) { since there is the 1 url in the urlset and my jars are not there then it does not find them. There must be something else I am missing on how to get my url to show up in that url set before the regex comparison code is run, I just don't know what that is -- View this message in context: http://struts.1045723.n5.nabble.com/using-annotations-with-struts-2-in-jboss-not-finding-actions-tp5710681.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