I tried to submit a form using
Struts 2 tags and got [error] [client 172.124.56] File does not exist: /home/mramalingam/HEAD/htdocs/test.action, referer:
http://<machineName>/WelcomeForm.jsp The docBase mentioned in
tomcat server.xml is "/home/mramalingam/HEAD/htdocs" and the context path is empty
string. Action name is '
test' and I didn't give any namespace. I have tested by giving namespace also. But I got the same result.
Please let me know the reason for this error message. The FilterDispatcher is not invoked and the corresponding action class execute method is not called. So I am not able to see the result page in the browser.
The jsp from which I submitted the form is given below <%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Simple jsp page</title>
</head>
<body>
<s:form action="test">
<s:textfield label="Message" name="message"/>
<s:submit/>
</s:form>
</body>
</html>
The struts.xml which I used is ... <struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<package name="marketplace" extends="struts-default">
<action name="test" class="com.wm.avocado.struts.Test">
<result>/Test.jsp</result>
</action>
<!-- Add actions here -->
</package>
<!-- Add packages here -->
</struts>
Entry in the web.xml ... <filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Am I missing any other configuration? Please help me in overcoming this issue.