Re: error : 404: There is no Action mapped for namespace / and action name showlogin.
barkha.jasani wrote: Hi Folks, I've deployed my application in tomcat but when i hit the url to call my action,i'm facing this error..here is the detailed log, http://pastebin.com/d3e33ffdf please have a look at this and kindly do the needful if you know the solution. Thanks in advance, With Regards, Barkha Jasani If you're using the Convention plugin, this could be related to unresolved problems that I'm having where results appear not to get resolved correctly (WW-3276) Regards -- View this message in context: http://www.nabble.com/error-%3A-404%3A-There-is-no-Action-mapped-for-namespace---and-action-name-showlogin.-tp25782490p25798892.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Problem testing my action when I’ve g ot a springbean inside the validators.xml
Is there somebody who can help me with this question? Please :) -- View this message in context: http://www.nabble.com/Problem-testing-my-action-when-I%E2%80%99ve-got-a-springbean-inside-the-validators.xml-tp24862185p25799631.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Unit Testing Actions with Annotation based validation in Struts 2.1.6
I'm looking for a way of unit testing an action that uses annotations for validation with 2.1.6. There is a nice example in the Struts 2.x docs on how to unit test validation logic in an Action (see here http://struts.apache.org/2.x/docs/how-do-i-unit-test-my-actions-validation-logic.html) Unfortunately the ActionValidatorManagerFactory class is only present in 2.0.x as it was removed in 2.1.x so this example is no longer valid. If you just new up an AnnotationActionValidatorManager you get an NPE and if you populate the members all the way up (ValidatorFactory, ValidatorFileParser, ObjectFactory) you get a message saying that you are unable to load validator class com.opensymphony.xwork2.validator.validators.RequiredFieldValidator as specified in the default.xml file in the jar. I've had a look on the mailing list and can't find anything so does anyone have any ideas? -- View this message in context: http://www.nabble.com/Unit-Testing-Actions-with-Annotation-based-validation-in-Struts-2.1.6-tp25800676p25800676.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts 2 s:if tag
Could someone correct my syntax please - I can't get this to work at all. s:if test=s:property value=value[#parameter.index].type/=='ENUM' /s:if I keep getting a JasperException; equal symbol expected Regards -- View this message in context: http://www.nabble.com/Struts-2-%3Cs%3Aif%3E-tag-tp25801138p25801138.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 s:if tag
Try something like this. s:if test=%{parameter.index.type}=='ENUM' Gregor RogerV wrote: Could someone correct my syntax please - I can't get this to work at all. s:if test=s:property value=value[#parameter.index].type/=='ENUM' /s:if I keep getting a JasperException; equal symbol expected Regards -- Gregor Marinšek TIS d.o.o. Ljubljanska 9, Maribor e-mail: gmarin...@tis.si http://www.tis.si GSM: (+386) 040 730 015 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2, annotated actions an weblogic
Hi! The last thing, which log prints out is WebLogic server detected. Enabling Struts parameter access work-around. On Tomcat server, the app starts loading actions. I found this in s2 src - org.apache.struts2.dispatcher.Dispatcher.java on 375 method init_CheckWebLogicWorkaround. Actually the app only sets parameter paramsWorkaroundEnabled to true. For what is this parameter used? In the log file there is no error. Is it maybe issue with classloader? I appreciate your help! Thank you in advance! Gregor Gregor Marinšek wrote: Hi there! I have an application running on tomcat without any problem. But when i delploy application to oracle weblogic, the server does not recognize the actions. I run config-browser and the actions section is empty. I'm using WL 10.3, java 1.5. Has anyone got the same problem? Thank you in advance! Gregor - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 s:if tag
Try something like this. s:if test=%{parameter.index.type}=='ENUM' Gregor That stops the exception but it's not evaluating correctly. If I add s:property value=value[#parameter.index].type/ to my jsp immediately prior to the s:if tag then when it is ENUM, it prints ENUM and then fails to do anything with the content of the s:if tag. I should have mentioned that the reason I'm using value[#parameter.index] is that my test is sitting inside an iterator loop. s:iterator value=value status=parameter s:property value=value[#parameter.index].type/ s:if test=s:property value='value[#parameter.index].type'/=='ENUM' using single quotes around the value attribute stops the error message as well but it's still ignoring the contents of the s:if. Interstingly enough, it does exactly the same thing if I change the test to s:if test=s:property value='value[#parameter.index].type'/!='ENUM' Regards -- View this message in context: http://www.nabble.com/Struts-2-%3Cs%3Aif%3E-tag-tp25801138p25801415.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 s:if tag
You don't have to use value, because s:iterator puts the value on the top of ValueStack. What about: s:if test=%{type=='ENUM'} I assume you are iterating over objects, with defined get/setType Gregor RogerV wrote: Try something like this. s:if test=%{parameter.index.type}=='ENUM' Gregor That stops the exception but it's not evaluating correctly. If I add s:property value=value[#parameter.index].type/ to my jsp immediately prior to the s:if tag then when it is ENUM, it prints ENUM and then fails to do anything with the content of the s:if tag. I should have mentioned that the reason I'm using value[#parameter.index] is that my test is sitting inside an iterator loop. s:iterator value=value status=parameter s:property value=value[#parameter.index].type/ s:if test=s:property value='value[#parameter.index].type'/=='ENUM' using single quotes around the value attribute stops the error message as well but it's still ignoring the contents of the s:if. Interstingly enough, it does exactly the same thing if I change the test to s:if test=s:property value='value[#parameter.index].type'/!='ENUM' Regards -- Gregor Marinšek TIS d.o.o. Ljubljanska 9, Maribor e-mail: gmarin...@tis.si http://www.tis.si GSM: (+386) 040 730 015 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 s:if tag
Gregor Marinšek wrote: You don't have to use value, because s:iterator puts the value on the top of ValueStack. What about: s:if test=%{type=='ENUM'} I assume you are iterating over objects, with defined get/setType Gregor Thanks Gregor, that works - in conjunction with another older nabble post which discusses whether the object returned implemented the equals method. In fact type is an Enum - so I provided a method on my Action to return the value as a String and called that instead, so now I've got s:if test=%{typeAsString=='ENUM'} which works whereas s:if test=%{type=='ENUM'} doesn't. For future reference, how would I handle an Enum in s:if (I'm not confusing things, the value ENUM is one of the values of the Enum type in this instance) Regards -- View this message in context: http://www.nabble.com/Struts-2-%3Cs%3Aif%3E-tag-tp25801138p25801877.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Servlet filter as front controller
I have mentioned this before in another thread that Struts2 is breaking Servlet specification 2.4 in this regard, but have heard no comment on it which means two things either I have a point or I am way off. In Servlet specification 2.4 filters are not supposed to be accessed directly as a resource. And anything other than a jsp page need to have a Servlet mapping in order to make it accessible (as per specification). Struts 1 had ActionServlet to which *.action or *.do mapping was done. This sort of deviation from sped is causing some folks issues when it comes to using some appservers that follow the spec and you have to resort to all sort of hacks to get around it. --- On Wed, 10/7/09, Arthur Neves arthu...@gmail.com wrote: From: Arthur Neves arthu...@gmail.com Subject: Re: Servlet filter as front controller To: Struts Users Mailing List user@struts.apache.org Received: Wednesday, October 7, 2009, 11:57 PM With the filter struts2 can intercept all request. I think it's more difficult to do thinks like, the namespace struct with a servlet,i dont have sure though. On Wed, Oct 7, 2009 at 2:58 PM, Unmesh joshi unmesh_jo...@hotmail.comwrote: Hi,Struts2 uses servlet filter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter as front controller, rather than having a servlet act as front controller. Is there any specific advantage of using servlet filter over servlet (as in struts 1.1)? Thanks,Unmesh _ Great events make grand headlines – read them all on MSN India http://in.msn.com __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Servlet filter as front controller
I was thinking about this issue recently and wondered if simply mapping a do-nothing servlet to * would workaround this... I thought about trying it, but I only have tomcat and jetty handy for testing, and this doesn't seem to be an issue on either one. Although, a do-nothing servlet would probably solve the other problem of mapping welcome-files to index.action. -Wes On Thu, Oct 8, 2009 at 8:36 AM, Struts Two struts...@yahoo.ca wrote: I have mentioned this before in another thread that Struts2 is breaking Servlet specification 2.4 in this regard, but have heard no comment on it which means two things either I have a point or I am way off. In Servlet specification 2.4 filters are not supposed to be accessed directly as a resource. And anything other than a jsp page need to have a Servlet mapping in order to make it accessible (as per specification). Struts 1 had ActionServlet to which *.action or *.do mapping was done. This sort of deviation from sped is causing some folks issues when it comes to using some appservers that follow the spec and you have to resort to all sort of hacks to get around it. --- On Wed, 10/7/09, Arthur Neves arthu...@gmail.com wrote: From: Arthur Neves arthu...@gmail.com Subject: Re: Servlet filter as front controller To: Struts Users Mailing List user@struts.apache.org Received: Wednesday, October 7, 2009, 11:57 PM With the filter struts2 can intercept all request. I think it's more difficult to do thinks like, the namespace struct with a servlet,i dont have sure though. On Wed, Oct 7, 2009 at 2:58 PM, Unmesh joshi unmesh_jo...@hotmail.comwrote: Hi,Struts2 uses servlet filter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter as front controller, rather than having a servlet act as front controller. Is there any specific advantage of using servlet filter over servlet (as in struts 1.1)? Thanks,Unmesh _ Great events make grand headlines – read them all on MSN India http://in.msn.com __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Servlet filter as front controller
Dummy servlet should do it (as mentioned by WES), I know this in case of WAS where you are going to create plugin-xml file for your HTTP server. Without a dummy servlet mapped to *.action or *.do, Http server would fail to route any request that is mapped to *.action or *.do in the filter. --- On Thu, 10/8/09, Wes Wannemacher w...@wantii.com wrote: From: Wes Wannemacher w...@wantii.com Subject: Re: Servlet filter as front controller To: Struts Users Mailing List user@struts.apache.org Received: Thursday, October 8, 2009, 1:15 PM I was thinking about this issue recently and wondered if simply mapping a do-nothing servlet to * would workaround this... I thought about trying it, but I only have tomcat and jetty handy for testing, and this doesn't seem to be an issue on either one. Although, a do-nothing servlet would probably solve the other problem of mapping welcome-files to index.action. -Wes On Thu, Oct 8, 2009 at 8:36 AM, Struts Two struts...@yahoo.ca wrote: I have mentioned this before in another thread that Struts2 is breaking Servlet specification 2.4 in this regard, but have heard no comment on it which means two things either I have a point or I am way off. In Servlet specification 2.4 filters are not supposed to be accessed directly as a resource. And anything other than a jsp page need to have a Servlet mapping in order to make it accessible (as per specification). Struts 1 had ActionServlet to which *.action or *.do mapping was done. This sort of deviation from sped is causing some folks issues when it comes to using some appservers that follow the spec and you have to resort to all sort of hacks to get around it. --- On Wed, 10/7/09, Arthur Neves arthu...@gmail.com wrote: From: Arthur Neves arthu...@gmail.com Subject: Re: Servlet filter as front controller To: Struts Users Mailing List user@struts.apache.org Received: Wednesday, October 7, 2009, 11:57 PM With the filter struts2 can intercept all request. I think it's more difficult to do thinks like, the namespace struct with a servlet,i dont have sure though. On Wed, Oct 7, 2009 at 2:58 PM, Unmesh joshi unmesh_jo...@hotmail.comwrote: Hi,Struts2 uses servlet filter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter as front controller, rather than having a servlet act as front controller. Is there any specific advantage of using servlet filter over servlet (as in struts 1.1)? Thanks,Unmesh _ Great events make grand headlines – read them all on MSN India http://in.msn.com __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Multiple select
Thanks Eric for posting your solution, this helped me remember that unusual OGNL syntax on the value attribute. Because I have not found so many working examples out there, I'll post mine too: s:select label=%{getText('caseFile.sentence')} name=caseFile.sentences.qualifierId value=caseFile.sentences.{qualifierId} list=availableQualifiers listKey=qualifierId listValue=display emptyOption=false multiple=true theme=css_xhtml required=false cssClass=text medium cssStyle=width:300px / CaseFile contains ListQualifier called 'sentences'. Qualifier looks like private Long qualifierId; private String code; private String description; // Transients private String display; // Just transiently defined as code + - + description Thanks - Stanley, Eric wrote: Figured it out in case anyone has this same issue. Added a value attribute, and used OGNL to grab a list of id's from ListGroup instead of just the ListGroup which works just fine in a select where multiple=true. s:select label=group multiple=true size=4 name=user.groups value=user.groups.{id} list='groupList' listKey=id listValue=name / -Good luck -- View this message in context: http://www.nabble.com/Multiple-select-tp22564208p25803112.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Basic question on Struts 2 flow
I'm just getting into Struts 2, and have read through some tutorials and experimented a bit with some small Struts 2 applications. But, I'm still missing a fundamental point about the flow, and am looking for help. My background with JSPs and even HTML is limited, so I apologize if this is ridiculously elementary, which it probably is. Here's a simple 2 page application snippet to illustrate my question: - Page 1 has a button labeled Edit User Profile. - Page 2 shows the user profile with a couple editable fields (e.g. name and email address), and a button labeled 'Submit Changes'. The page when first displayed should be populated with the existing profile. The user can then edit fields and submit the page. I placed the fields within a form tied to action USER_PROFILE_ACTION, which is tied to an action class. I defined the fields using textfield tags. My issue is in initially displaying Page 2. If I define the Page 1 button to reference the Page 2 JSP file directly, then Page 2 is displayed, but with empty fields. That is, no getters are called, and the fields aren't prepopulated. So, I instead did something that didn't really seem quite right to me. I defined the Page 1 button to reference action USER_PROFILE_ACTION instead of the Page 2 JSP file. Now the initial display does call the getters and populate the page. But, it also calls the action class execute() method, which I don't want because at initial display the submit action hasn't yet occured. Thanks for any clarification you can provide. -- View this message in context: http://www.nabble.com/Basic-question-on-Struts-2-flow-tp25803238p25803238.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Multiple select
wkbutler wrote: Thanks Eric for posting your solution, this helped me remember that unusual OGNL syntax on the value attribute. Once again I'll post my suggestion that the %{} notation be used EVERYWHERE you expect the framework to evaluate your expression with OGNL so that these are less confusing during subsequent development or maintenance. The unusual syntax you describe is an example of the power of OGNL. caseFile.sentences is a collection of objects, but what you want is a collection of just one field from each of those objects. The OGNL documentation calls this projection: http://www.opensymphony.com/ognl/html/LanguageGuide/projection.html . I don't have much experience with other EL's...is this type of construct possible with the others that people have been suggesting (JUEL, MVEL, etc.)? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 s:if tag
Gregor Marinšek wrote: s:if test=%{parameter.index.type}=='ENUM' I assume you meant: %{parameter.index.type=='ENUM'} -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
2.1.6, Convention Plugin + Spring + Glassfish 2 ur2
Hi All, I did ask this question before but never received an answer, I do understand that this is quite complex problem. However I thought I would ask again in case anyone else has come across this... When I use the Convention plugin with Spring and Glassfish, upon deploy of the resulting WAR the Convention plugin scans all the packages that are in the /applications/j2ee-modules of the given domain. This is seen in the server log of the Glassfish e.g. [#|2009-10-08T14:24:09.106+0100|WARNING|sun-appserver9.1|javax.enterpris e.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=00746e6a-87 1e-4a90-b155-92d8b81b942b;| java.lang.Exception: Could not load domains/domain3/applications/j2ee-modules/OtherApp/WEB-INF/classes/com/o ther/package/SubmissionThread.class at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder .java:745) at com.opensymphony.xwork2.util.finder.ClassFinder.init(ClassFinder.java: 148) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findAction s(PackageBasedActionConfigBuilder.java:295) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActio nConfigs(PackageBasedActionConfigBuilder.java:277) OtherApp is another application I have installed on the same domain. Is this a bug with convention? I am using default settings and when I get the chance I plan on adding struts.convention.package.locators.basePackage to be my com.myApp.stuff to see if this restricts this... Any help would be very much appreciated. James - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Basic question on Struts 2 flow
All of your links and forms etc in your applications should point to 'actions' they should never point directly to jsp files. (I.e. the user should never see a url in the address bar that end in .jsp). It's is normal to have noop actions that do nothing but return 'SUCCESS'. You would do yourself a big favor if you went and got the book Struts 2 In Action form Manning. You will save yourself a huge amount of time in the long run. On Thu, Oct 8, 2009 at 11:09 AM, roncville ro...@ronsgallery.com wrote: I'm just getting into Struts 2, and have read through some tutorials and experimented a bit with some small Struts 2 applications. But, I'm still missing a fundamental point about the flow, and am looking for help. My background with JSPs and even HTML is limited, so I apologize if this is ridiculously elementary, which it probably is. Here's a simple 2 page application snippet to illustrate my question: - Page 1 has a button labeled Edit User Profile. - Page 2 shows the user profile with a couple editable fields (e.g. name and email address), and a button labeled 'Submit Changes'. The page when first displayed should be populated with the existing profile. The user can then edit fields and submit the page. I placed the fields within a form tied to action USER_PROFILE_ACTION, which is tied to an action class. I defined the fields using textfield tags. My issue is in initially displaying Page 2. If I define the Page 1 button to reference the Page 2 JSP file directly, then Page 2 is displayed, but with empty fields. That is, no getters are called, and the fields aren't prepopulated. So, I instead did something that didn't really seem quite right to me. I defined the Page 1 button to reference action USER_PROFILE_ACTION instead of the Page 2 JSP file. Now the initial display does call the getters and populate the page. But, it also calls the action class execute() method, which I don't want because at initial display the submit action hasn't yet occured. Thanks for any clarification you can provide. -- View this message in context: http://www.nabble.com/Basic-question-on-Struts-2-flow-tp25803238p25803238.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2
Those exceptions are annoying, but they can be ignored. There are multiple settings for scanning, like not scanning jars, which you can play with. musachy On Thu, Oct 8, 2009 at 10:19 AM, James Cook james.c...@wecomm.com wrote: Hi All, I did ask this question before but never received an answer, I do understand that this is quite complex problem. However I thought I would ask again in case anyone else has come across this... When I use the Convention plugin with Spring and Glassfish, upon deploy of the resulting WAR the Convention plugin scans all the packages that are in the /applications/j2ee-modules of the given domain. This is seen in the server log of the Glassfish e.g. [#|2009-10-08T14:24:09.106+0100|WARNING|sun-appserver9.1|javax.enterpris e.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=00746e6a-87 1e-4a90-b155-92d8b81b942b;| java.lang.Exception: Could not load domains/domain3/applications/j2ee-modules/OtherApp/WEB-INF/classes/com/o ther/package/SubmissionThread.class at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder .java:745) at com.opensymphony.xwork2.util.finder.ClassFinder.init(ClassFinder.java: 148) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findAction s(PackageBasedActionConfigBuilder.java:295) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActio nConfigs(PackageBasedActionConfigBuilder.java:277) OtherApp is another application I have installed on the same domain. Is this a bug with convention? I am using default settings and when I get the chance I plan on adding struts.convention.package.locators.basePackage to be my com.myApp.stuff to see if this restricts this... Any help would be very much appreciated. James - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2
Hi, thank you very much for your response... The exceptions don't really bother me, it is just we deployed an app onto a domain with 5 other apps and it just trawled through all their packages. This does however beg the question. What would have happened if I had another S2 app on the domain and that scanning actually picked up valid actions? Would my app actually be able to see them e.g. from the config-browser and would this affect the operation? Thanks again James -Original Message- From: Musachy Barroso [mailto:musa...@gmail.com] Sent: 08 October 2009 18:59 To: Struts Users Mailing List Subject: Re: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2 Those exceptions are annoying, but they can be ignored. There are multiple settings for scanning, like not scanning jars, which you can play with. musachy On Thu, Oct 8, 2009 at 10:19 AM, James Cook james.c...@wecomm.com wrote: Hi All, I did ask this question before but never received an answer, I do understand that this is quite complex problem. However I thought I would ask again in case anyone else has come across this... When I use the Convention plugin with Spring and Glassfish, upon deploy of the resulting WAR the Convention plugin scans all the packages that are in the /applications/j2ee-modules of the given domain. This is seen in the server log of the Glassfish e.g. [#|2009-10-08T14:24:09.106+0100|WARNING|sun-appserver9.1|javax.enterpris e.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=00746e6a-87 1e-4a90-b155-92d8b81b942b;| java.lang.Exception: Could not load domains/domain3/applications/j2ee-modules/OtherApp/WEB-INF/classes/com/o ther/package/SubmissionThread.class at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder .java:745) at com.opensymphony.xwork2.util.finder.ClassFinder.init(ClassFinder.java: 148) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findAction s(PackageBasedActionConfigBuilder.java:295) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActio nConfigs(PackageBasedActionConfigBuilder.java:277) OtherApp is another application I have installed on the same domain. Is this a bug with convention? I am using default settings and when I get the chance I plan on adding struts.convention.package.locators.basePackage to be my com.myApp.stuff to see if this restricts this... Any help would be very much appreciated. James - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2
different applications have different classpaths, so they are isolated, unless you put the classes in a shared dir, like tomcat shared lib dir, in that case there would be some mixing, unless you create package locators for them. Btw i just merged a patch into trunk that should take care of those exceptions: https://issues.apache.org/struts/browse/WW-3234 Thanks to Brian Ferris for it. musachy On Thu, Oct 8, 2009 at 11:10 AM, James Cook james.c...@wecomm.com wrote: Hi, thank you very much for your response... The exceptions don't really bother me, it is just we deployed an app onto a domain with 5 other apps and it just trawled through all their packages. This does however beg the question. What would have happened if I had another S2 app on the domain and that scanning actually picked up valid actions? Would my app actually be able to see them e.g. from the config-browser and would this affect the operation? Thanks again James -Original Message- From: Musachy Barroso [mailto:musa...@gmail.com] Sent: 08 October 2009 18:59 To: Struts Users Mailing List Subject: Re: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2 Those exceptions are annoying, but they can be ignored. There are multiple settings for scanning, like not scanning jars, which you can play with. musachy On Thu, Oct 8, 2009 at 10:19 AM, James Cook james.c...@wecomm.com wrote: Hi All, I did ask this question before but never received an answer, I do understand that this is quite complex problem. However I thought I would ask again in case anyone else has come across this... When I use the Convention plugin with Spring and Glassfish, upon deploy of the resulting WAR the Convention plugin scans all the packages that are in the /applications/j2ee-modules of the given domain. This is seen in the server log of the Glassfish e.g. [#|2009-10-08T14:24:09.106+0100|WARNING|sun-appserver9.1|javax.enterpris e.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=00746e6a-87 1e-4a90-b155-92d8b81b942b;| java.lang.Exception: Could not load domains/domain3/applications/j2ee-modules/OtherApp/WEB-INF/classes/com/o ther/package/SubmissionThread.class at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder .java:745) at com.opensymphony.xwork2.util.finder.ClassFinder.init(ClassFinder.java: 148) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findAction s(PackageBasedActionConfigBuilder.java:295) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActio nConfigs(PackageBasedActionConfigBuilder.java:277) OtherApp is another application I have installed on the same domain. Is this a bug with convention? I am using default settings and when I get the chance I plan on adding struts.convention.package.locators.basePackage to be my com.myApp.stuff to see if this restricts this... Any help would be very much appreciated. James - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2
Excellent. Thank you musachy and thanks Brian. :) -Original Message- From: Musachy Barroso [mailto:musa...@gmail.com] Sent: 08 October 2009 19:44 To: Struts Users Mailing List Subject: Re: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2 different applications have different classpaths, so they are isolated, unless you put the classes in a shared dir, like tomcat shared lib dir, in that case there would be some mixing, unless you create package locators for them. Btw i just merged a patch into trunk that should take care of those exceptions: https://issues.apache.org/struts/browse/WW-3234 Thanks to Brian Ferris for it. musachy On Thu, Oct 8, 2009 at 11:10 AM, James Cook james.c...@wecomm.com wrote: Hi, thank you very much for your response... The exceptions don't really bother me, it is just we deployed an app onto a domain with 5 other apps and it just trawled through all their packages. This does however beg the question. What would have happened if I had another S2 app on the domain and that scanning actually picked up valid actions? Would my app actually be able to see them e.g. from the config-browser and would this affect the operation? Thanks again James -Original Message- From: Musachy Barroso [mailto:musa...@gmail.com] Sent: 08 October 2009 18:59 To: Struts Users Mailing List Subject: Re: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2 Those exceptions are annoying, but they can be ignored. There are multiple settings for scanning, like not scanning jars, which you can play with. musachy On Thu, Oct 8, 2009 at 10:19 AM, James Cook james.c...@wecomm.com wrote: Hi All, I did ask this question before but never received an answer, I do understand that this is quite complex problem. However I thought I would ask again in case anyone else has come across this... When I use the Convention plugin with Spring and Glassfish, upon deploy of the resulting WAR the Convention plugin scans all the packages that are in the /applications/j2ee-modules of the given domain. This is seen in the server log of the Glassfish e.g. [#|2009-10-08T14:24:09.106+0100|WARNING|sun-appserver9.1|javax.enterpris e.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=00746e6a-87 1e-4a90-b155-92d8b81b942b;| java.lang.Exception: Could not load domains/domain3/applications/j2ee-modules/OtherApp/WEB-INF/classes/com/o ther/package/SubmissionThread.class at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder .java:745) at com.opensymphony.xwork2.util.finder.ClassFinder.init(ClassFinder.java: 148) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findAction s(PackageBasedActionConfigBuilder.java:295) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActio nConfigs(PackageBasedActionConfigBuilder.java:277) OtherApp is another application I have installed on the same domain. Is this a bug with convention? I am using default settings and when I get the chance I plan on adding struts.convention.package.locators.basePackage to be my com.myApp.stuff to see if this restricts this... Any help would be very much appreciated. James - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 s:if tag
Hi Roger, I usually use s:if test=%{typ...@com.mypackage@MY_ENUM_VALUE} Denis. RogerV wrote: Gregor Marinšek wrote: You don't have to use value, because s:iterator puts the value on the top of ValueStack. What about: s:if test=%{type=='ENUM'} I assume you are iterating over objects, with defined get/setType Gregor Thanks Gregor, that works - in conjunction with another older nabble post which discusses whether the object returned implemented the equals method. In fact type is an Enum - so I provided a method on my Action to return the value as a String and called that instead, so now I've got s:if test=%{typeAsString=='ENUM'} which works whereas s:if test=%{type=='ENUM'} doesn't. For future reference, how would I handle an Enum in s:if (I'm not confusing things, the value ENUM is one of the values of the Enum type in this instance) Regards -- View this message in context: http://www.nabble.com/Struts-2-%3Cs%3Aif%3E-tag-tp25801138p25815556.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org