• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2 - Getting File does not exist in /var/log/httpd/error_log file

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic