Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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.
    Bookmark Topic Watch Topic
  • New Topic