This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JXL with weblogic

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • 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: 43016
76
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I am running both servers (tomcat and weblogic) in same windows system.
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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();
 
If you're gonna buy things, buy this thing and I get a fat kickback:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic