I am doing migration tests to convention plugin using a project generated
with the archetype "struts2-archetype-blank"

After migrating the actions from struts.xml using the @Action annotation, I
could observe the following:

The line (in a JSP): <link href="<s:url value="*/css/examplecss*"/>"
rel="stylesheet" type="text/css"/> generates the following error:

ERROR Dispatcher Could not find action or result: /blank/css/examplecss
There is no Action mapped for namespace [/css] and action name [examplecss]
associated with context path [/blank]. - [unknown location]

The question is, why does struts look for an action in a reference to a css
file? I'm not sure if it's a problem of "struts2-archetype-blank" or the
IDE (Eclipse JEE 2018-12). The css file does not exist but without
convention plugin (only struts.xml) this strange error does not occur.

I solve the problem by changing the line by <link href="<s:url value="
*/css/examplecss.css*"/>" rel="stylesheet" type="text/css"/> and creating
the css file, but still it is strange that the problem occurs only when
using the convention plugin.

What is the reason for this difference of behavior between the actions
invocation with struts.xml and the convention plugin?

Reply via email to