WARNING: No configuration found for the specified action:

I get the following exception, please help resolve this issue.

Jul 16, 2013 11:18:40 AM org.apache.struts2.components.Form evaluateExtraParamsServletRequest WARNING: No configuration found for the specified action: `'HelloWorld1'` in namespace: `''`. Form action defaulting to 'action' attribute literal value. 

index.jsp :

 <s:form action="HelloWorld1" namespace="/" method="post" > <s:textfield name="userName" label="User Name" /> <s:submit /> </s:form> 

struts.xml :

 <package name="default" namespace="/" extends="struts-default" > <action name="HelloWorld1" class="java.vaannila.HelloWorld"> <result name="SUCCESS">/success.jsp</result> </action> </package> 

HelloWorld .java :

 public class HelloWorld extends ActionSupport{ //execute method } 
+4
source share
3 answers

The error indicates that Struts 2 unable to load the XML configuration. Make sure your struts.xml is inside the WEB-INF/classes directory. (The rest of the configuration looks fine.)

+2
source

If you are sure that the configurations are loaded correctly, try removing the namespace attribute or setting namespace="" instead of namespace="/" .

+2
source

This warning appears only when using devMode . Turn it off and it should disappear, add the following to struts.xml

 <constant name="struts.devMode" value="false"/> 
0
source

Source: https://habr.com/ru/post/1491575/


All Articles