I'm trying to call a struts action using ajax. The action is correctly called. The problem is that the action forward method is called but it is not executing.
My action is defined as follow:

<action path="/jsp-listreports" parameter="/WEB-INF/reportmanagement/listreports.jsp" scope="request" type="weboncampus.action.reportmanagement.ForwardActionReports" /> <action path="/listReports" type="weboncampus.action.reportmanagement.ActionGetReportsList" scope="request"> <forward name="list" path="/jsp-listreports.do" redirect="false"/>
       </action>

Shouldn't the page be automatically redirected to listreports.jsp after calling listReports.do?

Marta

Eric Martin wrote:
Marta - what exactly are you trying to do? By using an Ajax call, you
are going to get a response that should be the output of the forwarded
action.

$.ajax({
  url: '/listReports.do',
  type:'post',
  cache: false,
  dataType:'xml',
  success: function (resp) {
    // do something with resp
  }
});

-Eric

On Dec 4, 10:32 am, Marta Figueiredo <[EMAIL PROTECTED]> wrote:
Hi

I need to call an action using jquery..

The following piece of code works correctly for it is calling and
executing code the correct struts action. However.. the action itseft is
not being correcty forwarded. I don't think that the problem is the
action, for if I call it in other ways the forward works. Any ideas?

$.ajax({
               url: '/listReports.do',
               type:'post',
               cache: false,
               dataType:'xml'

           });

thanks
Marta

Reply via email to