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:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
  "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
  "http://struts.apache.org/dtds/struts-2.5.dtd";>
<struts>

        <!-- Max file upload size of 250 MB -->
        <constant name="struts.multipart.maxSize" value="262144000" />

        <package name="my-json" namespace="/json" extends="struts-default">
...

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 <user@struts.apache.org>
Subject: Re: problem Migrating from Struts 2.3 to 2.5

2016-12-22 6:53 GMT+01:00 John Aylward <john.aylw...@sagenet.com>:
> 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

> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC
>   "-//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

> <struts>
>        <!-- Load in the default Struts configuration so we get all the basic 
> interceptors.
>              This is in the struts-core jar file if you need to look at it 
> for reference. -->
>        <!-- <include file="struts-default.xml" /> -->

You don't need that, Struts will automatically load any struts-default.xml and 
struts-plugin.xml

> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC
>     "-//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

Reply via email to