• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JXL with weblogic

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone,
I am facing problems with XL file creation using JXL and weblogic, where as same code is working fine in Tomcat server. In weblogic its putting non readable characters. there is no differenct in UTF character seeting in both the server. Please let me know is there any other setting I need to worry about.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you explicitly setting Unicode as the file encoding? If not, the platform default encoding will be used, which may be a different on the WebLogic machine than on the Tomcat machine.
 
nuthan kumar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am running both servers (tomcat and weblogic) in same windows system.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doesn't WebLogic use the BEA JVM? It could conceivably use a different encoding than the JVM Tomcat uses; check the "file.ecoding" system property on both.
 
nuthan kumar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, BEA also using same JVM as tomcat .. and in both servers file.encoding system property is Cp1252
 
nuthan kumar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the problem, there is not issue with XL file generation, but downloading file giving problem. I am using following content type in the jsp file

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment;filename=\""+filename+"\"");
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

nuthan kumar wrote:I found the problem, there is not issue with XL file generation, but downloading file giving problem. I am using following content type in the jsp file

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment;filename=\""+filename+"\"");



Hi,nuthan

Have you solved this problem? I have the exact problem as you met and feel so depressed..

 
fengting shen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this issue has been resolved!
it’s because the response buffer is not clear when we use the ServletOutputStream in Weblogic, so before we get the ServletOutputStream, just reset the response buffer. Then the problem is disappeared.

By adding following code:

response.resetBuffer();
 
reply
    Bookmark Topic Watch Topic
  • New Topic