• Post Reply Bookmark Topic Watch Topic
  • New Topic

restful  RSS feed

 
shyam sunder
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there a way to export the excel sheet through restful webservice.

I have tried alot but in vain.

I thought of using a filter to intercept the response sent from resource.but when the filter is intercepted and iam sending excel response, there's an error say that IE cannot download.

suggestion and code examples are welcomed.

I am using jsr and jersey 1.1 version in my java application
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch shyam,

Please check your private messages.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem I would capture an HTTP response containing an excel file that works with a tool like tcpmon and compare it to the HTTP response that is coming back from Jersey - paying particular attention to the HTTP headers (like the media type in the Content-Type header).

That may give you some place to start.

Apache TCPMon (Tutorial)
java.net tcpmon
 
shyam sunder
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have applied correct content type for excel
i.e httpResp.setContentType("application/vnd.ms-excel");
httpResp.addHeader("Content-Disposition", "attachment; filename=\"exceltemplate.xls\"");

but still i am getting that IE cannot download.

I doubt if the front end that is ajax is not able to receieve the response.since that is being read and flushed in filter but not downloadable in front end i.e ajax
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"shyam shyam" did you see the private message sent to you by Peer above?
 
shyam sunder
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i have seen but i think it is not useful for me.

its only to moniter the request and response objects.
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"shyam shyam " its regarding your display name, which does not follow the Javaranch naming policy . Please adjust it using the My profile link above.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... and you'll see your private messages by clicking on the "My Private Messages" link in the page header.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!