need help 2 run my first struts2 application... error is resource is not available



PLZ TELL ME ABOUT IS THERE ANY ERROR IN MY FIRST STRUTS2 APPLICAITON CODING....\ ALSO TELL ME ABOUT WHERE I HAVE CHANGE IN CODING PART...............


* STRUTS.XML*



<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 2.3//EN" "http://ift.tt/18p24sP">

<struts>

<package name="default" extends="struts-default">

<action name="getdata" class="com.hardik.actions.TutorialAction">
<result name="success">/success.jsp</result>`enter code here`
<result name="failure">/errror.jsp</result>

</action>

</package>

</struts>


WEB.XML FILE CONTENT



<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://ift.tt/ra1lAU" xmlns="http://ift.tt/nSRXKP" xsi:schemaLocation="http://ift.tt/nSRXKP http://ift.tt/1eWqHMP" id="WebApp_ID" version="3.0">
<display-name>struts2Started</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>



<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>



</web-app>


***TUTORIAL ACTION CLASS***


public class TutorialAction {

public String execute()
{
System.out.println("hello");
return "success";
}

}


1.I have included all jars in lib folder and in they are in build path


2.I am using struts-2.3.16.1


3.I am trying to execute this url


No comments:

Post a Comment