wood burning stoves 2.0*
The moose likes Other JSE/JEE APIs and the fly likes JXL with weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JXL with weblogic" Watch "JXL with weblogic" New topic
Author

JXL with weblogic

nuthan kumar
Ranch Hand

Joined: Feb 14, 2006
Posts: 47
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.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41083
    
  43
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.


Ping & DNS - my free Android networking tools app
nuthan kumar
Ranch Hand

Joined: Feb 14, 2006
Posts: 47
I am running both servers (tomcat and weblogic) in same windows system.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41083
    
  43
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

Joined: Feb 14, 2006
Posts: 47
No, BEA also using same JVM as tomcat .. and in both servers file.encoding system property is Cp1252
nuthan kumar
Ranch Hand

Joined: Feb 14, 2006
Posts: 47
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+"\"");
fengting shen
Greenhorn

Joined: Oct 08, 2009
Posts: 2
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

Joined: Oct 08, 2009
Posts: 2
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();
 
Don't get me started about those stupid light bulbs.
 
subject: JXL with weblogic
 
Similar Threads
java Excel
jxl.jar to be used in a .jsp file
Using jxl apis for prompting user to enter location for excel sheet?
copy workbook(xls) using xls
Convert String to Date Issue