Hello,
I have just started learning about
Struts and I have started with the Hello World Program. When I run my program I get the following error.
HTTP Status 404 -
type Status report
message
description The requested resource is not available.
Could some one kindly help me with debugging my program. I am not sure what needs to be done.
Thanks a lot in advance.
Details:
1. web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>StrutsLearning</display-name>
<
servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
2. struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<struts-config>
<form-beans>
<form-bean name="HelloWorldForm" type="com.home.form.HelloWorldForm"/>
</form-beans>
<global-forwards>
<forward name="helloWorld" path="/helloWorld.do"/>
</global-forwards>
<action-mappings>
<action path="/helloWorld" type="com.home.action.HelloWorldAction" name="HelloWorldForm">
<forward name="success" path="/helloWorld.jsp" />
</action>
</action-mappings>
</struts-config>