Re: problem Migrating from Struts 2.3 to 2.5
2016-12-22 6:53 GMT+01:00 John Aylward : > I'm trying to migrate my struts application from 2.3.31 to 2.5.8 but it > appears that my struts.xml is not getting loaded. My web.xml is pretty > standard: Please try to use Struts 2.5.5 > >"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" > "http://struts.apache.org/dtds/struts-2.3.dtd";> Change 2.3 to 2.5 > > > You don't need that, Struts will automatically load any struts-default.xml and struts-plugin.xml > > "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" > "http://struts.apache.org/dtds/struts-2.3.dtd";> Same here, replace 2.3 with 2.5 Anyway, this can be related to https://issues.apache.org/jira/browse/WW-4727 but I cannot reproduce this with my example app Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: problem Migrating from Struts 2.3 to 2.5
I combined all my struts.xml files into one and finally got a struts configuration error after a bit of massaging to get rid of old elements that I didn't need anymore and messed one up. At least I know the struts.xml file is being loaded now. I know the actions are being found because I purposefully made an error in the action section and it was properly reported. However, once I cleaned up my errors, my actions still appear to not be loading, or perhaps they are loading in the wrong namespace. When I try to access my actions in a browser directly, I get this message: There is no Action mapped for namespace [/json] and action name [ClientData!loggedIn] associated with context path []. I placed all my loaded files into the /json namespace: http://struts.apache.org/dtds/struts-2.5.dtd";> ... In the 2.3.x branch I would get log message when an action was configured, but in 2.5.x I don't appear to get any such messages. -- John -Original Message- From: Lukasz Lenart [mailto:lukaszlen...@apache.org] Sent: Thursday, December 22, 2016 1:33 AM To: Struts Users Mailing List Subject: Re: problem Migrating from Struts 2.3 to 2.5 2016-12-22 6:53 GMT+01:00 John Aylward : > I'm trying to migrate my struts application from 2.3.31 to 2.5.8 but it > appears that my struts.xml is not getting loaded. My web.xml is pretty > standard: Please try to use Struts 2.5.5 > "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" > > "http://cp.mcafee.com/d/FZsSd1NJ5xVdBVVx5UTsSzssqenAXIELCQrzzhOYDtBOVJ > 6UUQsL9TphsdEEEKeczDT73ozkD3Jb7Cdyw2GqhY6YKrFF7MrOVJ6P8Uw-Y_R-hd7bxEVp > d7afnKnjpjjVBNcQsKcKsJt6OaaJPhO_OEuvkzaT0QSyrodTVdYQsELKe8IICXCM0t9NrD > jJmSNf-00Uxd2CkD5Kt2WvcYxd0STjUBU_dKc2Wq8UQsLnbydiseQIuoSa1Rd8-3un1l9N > rDjJmSNf-00CSnzhOYr1vF6y1qdi1_GCy0rAhzIVg8Cy1Sdljh0cjyTexEwjVAQgjGq84- > vdIc6Sf2aBrb8"> Change 2.3 to 2.5 > > > You don't need that, Struts will automatically load any struts-default.xml and struts-plugin.xml > "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" > > "http://cp.mcafee.com/d/FZsS71NJ5xVdBVVx5UTsSzssqenAXIELCQrzzhOYDtBOVJ > 6UUQsL9TphsdEEEKeczDT73ozkD3Jb7Cdyw2GqhY6YKrFF7MrOVJ6P8Uw-Y_R-hd7bxEVp > d7afnKnjpjjVBNcQsKcKsJt6OaaJPhO_OEuvkzaT0QSCrodTVdYQsELKe8IICXCM0t9NrD > jJmSNf-00Uxd2CkD5Kt2WvcYxd0STjUBU_dKc2Wq8UQsLnbydiseQIuoSa1Rd8-3un1l9N > rDjJmSNf-00CSnzhOYr1vF6y1qdi1_GCy0rAhzIVg8Cy1Sdljh0cjyTexEwjVAQgjGq84- > vdIc6UKR_Jar3J3JL"> Same here, replace 2.3 with 2.5 Anyway, this can be related to http://cp.mcafee.com/d/k-Kr3x8i6xASyMYCOYYMyYrKrhKed7bOtSknPqdNNEVujKOVsSzssqenAXIEK6Qkkn76hPXzxIhGjxSBzP6Ng1ld8-3undQQzUdVsSzpAsgvuvW_8CzBMQsICzB7HTbFIFFYOUCqen6nemKzp55mVEVvVkffGhBrwqrpdI6XYC-qeknT74mmjtPpesRG9pAGkr-DqJJyvY01MhB7s8hGoF-0a0FtwsCedJQ-9ufPrz0KCyed7bROUzkD3Jb7CdywtjifwTBMlismVQXlJIj_w09JBUQsL6MnWhEwmzkwvWFEw6V4oXek29EwtzlkQg34UJPEq84-pd44WCy1fDPr31I9fTe0fYVuvP but I cannot reproduce this with my example app Regards -- Łukasz + 48 606 323 122 + http://cp.mcafee.com/d/1jWVIgdEIf9ILfc8L6XCQrzzhOYDtB5YSzssqenAXIKndET + 76zBVeXabxJ555NNAs-UUr4qAUtFoYNIk0ljifwTBPtd8-3undESp747TD-LO9EVsd7b9E + VhWZOWraqvcK9CzBNBPBHEShhlKqen-l3PWApmU6CS3r1K_9LCzB5ZNN5BATsS02f-6NDM + 07BzYdJQ-9ufPrz0KCyed7bROUzkD3Jb7CdywtjifwTBMlismVQXlJIj_w09JBUQsL6MnW + hEwmzkwvWFEw6V4oXek29EwtzlkQg34UJPEq84-pd44WCy1fDPr31KhGv - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: problem Migrating from Struts 2.3 to 2.5
Ok, I got it to work with an include file on 2.5.8. In my main struts.xml I added this: Then in my included file I had to set this: The strict method invocation was preventing my actions from loading. Disabling it allowed my wildcard actions to work again. I'm not sure if the regex was needed or not, but I'm leaving it for now since it's working. -- John J. Aylward -Original Message- From: John Aylward [mailto:john.aylw...@sagenet.com] Sent: Thursday, December 22, 2016 10:20 AM To: Struts Users Mailing List Subject: RE: problem Migrating from Struts 2.3 to 2.5 I combined all my struts.xml files into one and finally got a struts configuration error after a bit of massaging to get rid of old elements that I didn't need anymore and messed one up. At least I know the struts.xml file is being loaded now. I know the actions are being found because I purposefully made an error in the action section and it was properly reported. However, once I cleaned up my errors, my actions still appear to not be loading, or perhaps they are loading in the wrong namespace. When I try to access my actions in a browser directly, I get this message: There is no Action mapped for namespace [/json] and action name [ClientData!loggedIn] associated with context path []. I placed all my loaded files into the /json namespace: ... In the 2.3.x branch I would get log message when an action was configured, but in 2.5.x I don't appear to get any such messages. -- John - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: problem Migrating from Struts 2.3 to 2.5
Right, SMI is a new addition in Struts 2.5 and it's better to use it instead of disabling, please read this https://struts.apache.org/docs/action-configuration.html#ActionConfiguration-StrictMethodInvocation 2016-12-22 17:27 GMT+01:00 John Aylward : > Ok, I got it to work with an include file on 2.5.8. In my main struts.xml I > added this: > > > > > > > /> > value="([a-zA-Z]*)" /> > > > > > > Then in my included file I had to set this: > > strict-method-invocation="false"> > > The strict method invocation was preventing my actions from loading. > Disabling it allowed my wildcard actions to work again. I'm not sure if the > regex was needed or not, but I'm leaving it for now since it's working. > > > > -- > John J. Aylward > > -Original Message- > From: John Aylward [mailto:john.aylw...@sagenet.com] > Sent: Thursday, December 22, 2016 10:20 AM > To: Struts Users Mailing List > Subject: RE: problem Migrating from Struts 2.3 to 2.5 > > I combined all my struts.xml files into one and finally got a struts > configuration error after a bit of massaging to get rid of old elements that > I didn't need anymore and messed one up. At least I know the struts.xml file > is being loaded now. I know the actions are being found because I > purposefully made an error in the action section and it was properly reported. > > However, once I cleaned up my errors, my actions still appear to not be > loading, or perhaps they are loading in the wrong namespace. > > When I try to access my actions in a browser directly, I get this message: > There is no Action mapped for namespace [/json] and action name > [ClientData!loggedIn] associated with context path []. > > I placed all my loaded files into the /json namespace: > > > > > > ... > > In the 2.3.x branch I would get log message when an action was configured, > but in 2.5.x I don't appear to get any such messages. > > > -- > John > > > - > 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: problem Migrating from Struts 2.3 to 2.5
Yes, for now, I just need the application working as it did before. I'm planning to rewrite all the existing actions using the REST plugin and moving forward from there. Having STI enabled when using wildcard matching is a little bit of a headache though. The entire point of me using the wildcard matching was because I didn't want to have to type out every method in the configuration. STI makes me have to type out every method in the configuration again. -- John -Original Message- From: Lukasz Lenart [mailto:lukaszlen...@apache.org] Sent: Thursday, December 22, 2016 3:58 PM To: Struts Users Mailing List Subject: Re: problem Migrating from Struts 2.3 to 2.5 Right, SMI is a new addition in Struts 2.5 and it's better to use it instead of disabling, please read this - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org