When I click the link as shown in the
jsp file below I expect the console to print the System.out.println in the handler class but the
struts application does not do anything it shows up a blank HTML file. I have put the same contents in a <html:form> tag just below it and it also does not print anything on the console and shows a blank page.
<------------------- struts-config.xml --------------------> <form-bean name="availableClassesForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="toDo" type="java.lang.String"/>
</form-bean>
<action
name="availableClassesForm"
path="/availableclasses"
scope="request" parameter="toDo"
type="org.stjude.hc.onlineregistration.action.viewclasses.ViewAvaliableClassesHandler"
validate="false">
<forward name="Success" path="/webFront/jsp/class/AvailableClasses.jsp"/>
</action>
<-------------------------jsp ----------------> <a href="<c:url value="/availableclasses.do"><c
aram name="toDo" value="viewAvailableClasses"/> </c:urlAvailable Classes 2</span></a>
<html:form action="/availableclasses.do">
<html:hidden property="toDo" value="viewAvailableClasses"/>
<a href="javascript
ocument.availableClassesForm.submit()"> Available Classes </a>
</html:form>
<-------------------- Handler --------------------->
public class ViewAvaliableClassesHandler extends RegistrationAction {
public ActionForward viewAvailableClasses(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
System.out.println("toDo view Available Classes"); return mapping.findForward(FORWARD_Success);
}
}