Hi
I have to handle the following situation.

1. When user click submit on the webpage, the request goes to the action
class.
2 This action class performs some task,
3 If the task is ok then this action class should forward the request to
another action class and also open a new browser window
4 if the task fails then this action class should forward the request to
another action class which displays user the error messages

How can i do step 3,

This is how i have defined it in struts-config.xml file

<action name="POApprovalForm"
           type="com.pfizer.maps.action.purchase.POApprovalAction"
           validate="false" input="/pages/ApprovalDataDisplay.jsp"
           scope="request" path="/pages/purchase/POApprovalAction">
           <forward name="success"

path="/pages/approvals/ApprovalDataDispatchAction.do?nextpage=home" />
           <forward name="error"
               path="/pages/purchasing/po.jsp" />

</action>

in my POApprovalAction i do the following

if (error.getCompletionFlag().equals("1"))
      {

        return mapping.findForward("error");
      }
else
{
      // this is where i want some thing to open a new browser window with
some parameters i would be sending
       return mapping.findForward("success");
}

I cannot define _blank in my jsp page as i want the success to open in same
window,

Ashish

Reply via email to