• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Export data to csv file using Struts Action & Servlet Or Struts DownloadAction - HELP PLZZZ

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone,

I tried two approaches to export CSV data and each one gives a different issue.

Approach 1 - Using a Struts Action class and Servlet

Here the problem is when i export the file, it gives me an option to save/open the file and after that the mouse cursor will show the waiting icon and i cant do anything on the browser window. the browser completely freeze there and i cant do anything on it unless i refresh the page. Anybody know whats going on here? See the code below:

Struts action class



Export Servlet


Toggle HighlightingOpen in New WindowSelect All


Struts.xml file entry.

<action path="/filedownload" type="com.myapp.ExportUserDetail" name="myForm" scope="session" validate="false">
</action>


Approach 2 - Using a Struts DownloadAction class

This approach is giving me new issue. I got the below error when i tried to execute the ReportDownload Action class. code attached

Error:

<Jun 7, 2011 4:55:23 PM CDT> <Warning> <org.apache.struts.action.RequestProcessor> <BEA-000000> <Unhandled Exception thrown: class java.lang.IllegalStateException>

My Class which extends DownloadAction


Finally when i ran the application, console printed the SOP line inside the getInputStream function and then i got the "RequestProcessor" error message which is given above.

I am running out of options here. Please help
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic