Hi,
I read several posted msgs in this forum with the same problem that I'm having. It's hard to troubleshoot my problem since there was no error msg in the
Tomcat stdout.txt and console
Here's a partial of my struts-config.xml
<!-- ===================== -->
<!-- Form Bean Definitions -->
<!-- ===================== -->
<form-beans>
<form-bean name="homeForm" type="com.pbh.orportal.forms.HomeForm">
<form-property name="dispatch" type="java.lang.String"/>
</form-bean>
</form-beans>
<!-- ============================ -->
<!-- Action Mapping Definitions -->
<!-- ============================ -->
<action-mappings type="com.pbh.orportal.actions.CustomActionMapping">
<!-- Default "home" action -->
<!-- Forwards to home.jsp -->
<action
path="/home"
type="com.pbh.orportal.actions.HomeAction"
validate="false"
name="homeForm"
input="/pages/home.jsp"
scope="request" >
<set-property property="loginRequired" value="true" />
<forward name="success" path="/pages/home.jsp" />
</action>
</action-mappings>
--- my Action class ----
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
String target = "success";
CustomActionMapping actionMapping = (CustomActionMapping) mapping;
// Does this action require the user to login?
// Note: The loginRequired flag is set in the <action path> of the
// struts-config.xml file
if (actionMapping.isLoginRequired()) {
String dispatch = ((HomeForm) form).getDispatch();
DAOFactory factory = DAOFactory.getDAOFactory(SQLSERVER);
}
return mapping.findForward(target);
}
--- my action form class --
public final class HomeForm extends ActionForm {
private String dispatch = null;
public HomeForm() {
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
return errors;
}
public String getDispatch() {
return this.dispatch;
}
public void setDispatch(String dispatch) {
this.dispatch = dispatch;
}
} // HomeForm
Do you the reason that I'm getting a blank page? The
JSP template is fine since I can view it without any compiler problem.
Thanks,
Tuan