Hi,
I have set a small
struts application
I cannot figure where my actionmapping is pointing
The struts-config.xml is:
<struts-config>
<data-sources/>
<form-beans>
<form-bean name="GetNameForm" type="sample.GetNameForm"/>
</form-beans>
<global-exceptions/>
<global-forwards>
<forward name="getName" path="inputname.jsp"/>
</global-forwards>
<action-mappings>
<action name="GetNameForm" path="/greeting" scope="request" type="sample.GreetingAction">
<forward name="sayHello" path="greeting.jsp"/>
</action>
</action-mappings>
<controller/>
</struts-config>
The setup i got is:
Apache Software Foundation\Tomcat 5.5\webapps\StrutsHello
and under StrutsHello
WEB-INF
classes
lib
pages/
and under pages i got
index.jsp
inputname.jsp
greeting.jsp
I got it working from index.jsp(which just has a logic redirect forward) to the inputname.jsp
and when i press the submit button is seems to go to the greeting.do and does nothing.
(ie it gets to
http://localhost:8080/StrutsHello/pages/inputname.jsp then pressing submit button with html:form action="/greeting.do"
it goes to :
http://localhost:8080/StrutsHello/greeting.do and does nothing.
Any suggestions to what i am doing wrong?
Thanks
Anil