Struts in Eclipse Indigo
I'm trying to run a simple struts appln. But at the very end i'm reaching the following error... Could anyone please help me.
HTTP Status 404 - /ActionTest/birthday.jsp
type Status report
message /ActionTest/birthday.jsp
description The requested resource (/ActionTest/birthday.jsp) is not available.
I've also attached the files i've used...
birthday.jsp <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="WEB-INF/struts-tags.tld" prefix="s"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Birthday | Wish</title> </head> <body> <h1> Enter the Birthday Boys name:</h1> <s:form action="happybirthday"> <s:textfield name="personName" label="Birthday Boy Name:" /> <s:submit/> </s:form> </body> </html> //birthdaySuccess.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="WEB-INF/struts-tags.tld" prefix="s"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Success | Birthday</title> </head> <h1>Wish you a Very Happy Birthday to You :-) <s:property value="personName"/></h1> </body> </html> //noBirthday.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="WEB-INF/struts-tags.tld" prefix="s"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>No | Birthday</title> </head> <body> <h1>No body</h1> </body> </html> //Web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns="https://java.sun.com/xml/ns/javaee" xmlns:web="https://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="https://java.sun.com/xml/ns/javaee https://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <display-name>ActionTest</display-name> <welcome-file-list> <welcome-file>birthday.jsp</welcome-file> </welcome-file-list> <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>*.jsp</url-pattern> </filter-mapping> </web-app> //struts.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN " "https://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="default" namespace="/greetings" extends="struts-default"> <action name="birthday"> <result>birthday.jsp</result> </action> <action name="happybirthday" class="greetings.HappyBirthday"> <result name="Success">birthdaySuccess.jsp</result> <result name="Failure">noBirthday.jsp</result> </action> </package> </struts>