Hi All,

I am a starter in struts2. i am developing a simple programme in struts2
which will take the name and
date as input and will display the same in the next page.

below is the sample code of my action calss
struts.xml

my index.jsp page is displaying properly whcih is asking for the inputs
but when i click the submitt button it is giving me the error as
*"The requested resource (/StrutsStarter/TestExample) is not availableE"*

i am not able to figure it out the reason behind this.any help in this
regard will be much appriciated.

*my Action class* is

along with getter and setter methods
public String execute() throws Exception{
  return SUCCESS;

 }


*struts.xml*
<struts>
<package name="aum.struts.tester" extends="struts-default">
…
<action name="TestExample" class="aum.struts.tester.StrutsExample">
<result name="input">/jsp/index.jsp</result>
<result>/jsp/welcome.jsp</result>
</action>
</package>
</struts>

*index.jsp*
<body>
    <s:form action="TestExample">
    <s:textfield label="Your Name" name="userName"/>
    <s:textfield label="Enter Date" name="date"/>
    <s:submit/>
    </s:form>
       </body>

Reply via email to