Re: Issue with Namespace Configuration

Lukasz Lenart <[email protected]> Wed, 11 Jun 2025 07:19:13 +0200
Newsgroups gmane.comp.jakarta.struts.user
Message-ID <CAMopvkNv1Ay4-KqJh6kotskeBFRS_NN3ZeQpBuUFf1ZDMZzp8w@mail.gmail.com>
śr., 11 cze 2025 o 00:59 Joseph Huynh <[email protected]>
napisał(a):
>
>  Hi Lukasz,
> I just figured out that I had bundled struts.xml in wrong place in WEB-INF/ instead of in WEB-INF/classes/. It is dispatching correctly now. My struts.xml is mostly fine except for the duplicate result name in the same namespace. I think Struts2 fails (silently) to dispatch in this case because it won't do anything, no errors either.

Duplicated result names don't matter, result names are "action local".
This means you can have an action named "viewRegistration" and at the
same time another action could have a result named "viewRegistration".
Basically the flow is as: http request -> action (by name) -> result
(by name for this action)

> I would love to learn to use Maven. I've tried several times in the past but not successful.

Just install Maven and use archetypes to generate your application,
all modern IDEs support Maven out-of-box. Follow these steps
https://struts.apache.org/maven-archetypes/
https://struts.apache.org/getting-started/

If unclear please let me know and I will update the docs.


Cheers
Lukasz