bhaarat Sharma wrote:
I think its better if i post some code.

This is the action mapping for
   <action name=\"accessRequestReportResult\"
class=\"action.reports.AccessRequestReportResult\">
    <result name=\"showReport\">/useradmin/AccessRequestReport.jsp</result>
    <result name=\"failure\">login.jsp</result>
      <result name="excel" type="stream">
        <param name="contentType">application/vnd.ms-excel</param>
        <param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${excelFilename}"</param>
        <param name="bufferSize">1024</param>
<!-- if you know the content length you should add the contentLength parameter -->
     </result>
   </action>


this is my execute method:


    public String execute() throws IOException, ServletException {

        //we dont enter here for excel
         if (getServletRequest().getParameter(\"isExcel\")==null)
        {
            setData(getActionValue());
            return \"showReport\";
        }
      //enter here for excel
        else
        {
do whatever it takes to set the action up so that when getExcelStream() is called the appropriate stream is returned, and when getExcelFilename() is called, the appropriate filename is returned.
              return "excel";
        }

    }

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to