Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Viewing data from database into an xls format not working

 
Jeff Foflygen
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am wondering if anybody could take a look at this code and tell me if they see why my application/vnd.ms-excel is not opening. I am getting no blatant errors in the code, the only thing that is concerning me is in certain bits of the code I get "Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc." for example, the setContentType("application/vnd.ms-excel"); says that note. below is the code. please help, or any suggestions are welcomed!
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Try doing this.


 
Jeff Foflygen
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I put the code in place that you suggested, no errors. Tomcat is installed and running. I go to launch and it does nothing, no errors, warnings, no succeeded, etc.... do I need to put in more code? it should just find the default excel and launch, correct?

thanks!
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

No, you dont need to put this in other code. It must open the download window as reponse. Why dont you try to execute it in mozilla firefox or google chrome ? because sometimes some browsers have popup blocker that blocks the download popup.

Cheers,
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The browser may be set to save XLS documents automatically without prompting the user - in which case it would show up in whatever directory is set as the default download directory.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic