Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic