Hi all,
I have a login page that works fine. On success I would like to move to the next page. The page is loading but empty (no values were populated). I have print out to a log file at the beginning of my Execute method (ActionClass) but it is not getting written to the log (ActionClass for the login page is writing to the log).
Here are the last lines from the log file:
com.archismo.archismo.web.LoginAction - Ending LoginAction execute.
com.archismo.archismo.dao.hibernate.HibernateSessionManager - Session closed.
net.sf.hibernate.impl.SessionImpl - closing session
net.sf.hibernate.impl.SessionImpl - disconnecting session
net.sf.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
net.sf.hibernate.impl.SessionImpl - transaction completion
org.apache.struts.action.RequestProcessor - processForwardConfig(ForwardConfig[name=success,path=/WEB-INF/Editor/main.jsp,redirect=false,contextRelative=false])
org.apache.catalina.core.ApplicationDispatcher - servletPath=/WEB-INF/Editor/main.jsp, pathInfo=null, queryString=null, name=null
org.apache.catalina.core.ApplicationDispatcher - Path Based Forward
org.apache.struts.util.RequestUtils - Looking for ActionForm bean instance in scope 'request' under attribute key 'frmMain'
org.apache.struts.util.RequestUtils - Creating new ActionForm instance of type 'com.archismo.archismo.web.MainForm'
org.apache.struts.util.RequestUtils - --> com.archismo.archismo.web.MainForm@23d275
org.apache.catalina.core.ApplicationDispatcher - Disabling the response for futher output
It looks like the ActionForm was found but I don’t see any sign of the Actionclass. It may have to do with the last line "Disabling ..."
Here is struts-config
<struts-config>
<form-beans>
<form-bean name="frmLogin" type="com.archismo.archismo.web.LoginForm"/>
<form-bean name="frmMain" type="com.archismo.archismo.web.MainForm"/>
</form-beans>
<!-- Action Mappings -->
<action-mappings>
<action path="/home" parameter="/WEB-INF/Editor/index.jsp" type="org.apache.struts.actions.ForwardAction"/>
<action path="/homeHeader" parameter="/WEB-INF/Editor/header.jsp" type="org.apache.struts.actions.ForwardAction"/>
<!--Login page-->
<action path="/login" input="/WEB-INF/Editor/login.jsp" type="com.archismo.archismo.web.LoginAction" name="frmLogin" scope="request" validate="false">
<forward name="success" path="/WEB-INF/Editor/main.jsp"/>
<forward name="failure" path="/WEB-INF/Editor/login.jsp"/>
</action>
<!--Main page-->
<action path="/main" input="/WEB-INF/Editor/main.jsp" type="com.archismo.archismo.web.MainAction" name="frmMain" scope="request" validate="false">
<forward name="load" path="/WEB-INF/Editor/main.jsp"/>
</action>
</action-mappings>
<!-- Message Resources -->
<message-resources parameter="ApplicationResources" null="false"/>
</struts-config>
Here is the first part of my ActionClass
public class MainAction extends Action
{
Log log = LogFactory.getLog(this.getClass());
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception
{
ActionForward forward = null;
DAOFactory factory = DAOFactory.getFactory();
MainForm mainForm;
String userAction;
try
{
if (log.isDebugEnabled())
log.debug("Starting MainAction execute.");
forward = mapping.findForward("load");
Any idea?
Lior
I have a login page that works fine. On success I would like to move to the next page. The page is loading but empty (no values were populated). I have print out to a log file at the beginning of my Execute method (ActionClass) but it is not getting written to the log (ActionClass for the login page is writing to the log).
Here are the last lines from the log file:
com.archismo.archismo.web.LoginAction - Ending LoginAction execute.
com.archismo.archismo.dao.hibernate.HibernateSessionManager - Session closed.
net.sf.hibernate.impl.SessionImpl - closing session
net.sf.hibernate.impl.SessionImpl - disconnecting session
net.sf.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
net.sf.hibernate.impl.SessionImpl - transaction completion
org.apache.struts.action.RequestProcessor - processForwardConfig(ForwardConfig[name=success,path=/WEB-INF/Editor/main.jsp,redirect=false,contextRelative=false])
org.apache.catalina.core.ApplicationDispatcher - servletPath=/WEB-INF/Editor/main.jsp, pathInfo=null, queryString=null, name=null
org.apache.catalina.core.ApplicationDispatcher - Path Based Forward
org.apache.struts.util.RequestUtils - Looking for ActionForm bean instance in scope 'request' under attribute key 'frmMain'
org.apache.struts.util.RequestUtils - Creating new ActionForm instance of type 'com.archismo.archismo.web.MainForm'
org.apache.struts.util.RequestUtils - --> com.archismo.archismo.web.MainForm@23d275
org.apache.catalina.core.ApplicationDispatcher - Disabling the response for futher output
It looks like the ActionForm was found but I don’t see any sign of the Actionclass. It may have to do with the last line "Disabling ..."
Here is struts-config
<struts-config>
<form-beans>
<form-bean name="frmLogin" type="com.archismo.archismo.web.LoginForm"/>
<form-bean name="frmMain" type="com.archismo.archismo.web.MainForm"/>
</form-beans>
<!-- Action Mappings -->
<action-mappings>
<action path="/home" parameter="/WEB-INF/Editor/index.jsp" type="org.apache.struts.actions.ForwardAction"/>
<action path="/homeHeader" parameter="/WEB-INF/Editor/header.jsp" type="org.apache.struts.actions.ForwardAction"/>
<!--Login page-->
<action path="/login" input="/WEB-INF/Editor/login.jsp" type="com.archismo.archismo.web.LoginAction" name="frmLogin" scope="request" validate="false">
<forward name="success" path="/WEB-INF/Editor/main.jsp"/>
<forward name="failure" path="/WEB-INF/Editor/login.jsp"/>
</action>
<!--Main page-->
<action path="/main" input="/WEB-INF/Editor/main.jsp" type="com.archismo.archismo.web.MainAction" name="frmMain" scope="request" validate="false">
<forward name="load" path="/WEB-INF/Editor/main.jsp"/>
</action>
</action-mappings>
<!-- Message Resources -->
<message-resources parameter="ApplicationResources" null="false"/>
</struts-config>
Here is the first part of my ActionClass
public class MainAction extends Action
{
Log log = LogFactory.getLog(this.getClass());
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception
{
ActionForward forward = null;
DAOFactory factory = DAOFactory.getFactory();
MainForm mainForm;
String userAction;
try
{
if (log.isDebugEnabled())
log.debug("Starting MainAction execute.");
forward = mapping.findForward("load");
Any idea?
Lior