| Author |
WebLogic Server - Problem encoding file MS Word in jsp
|
mattia sarto
Greenhorn
Joined: Feb 01, 2008
Posts: 5
|
|
Hi, i'm new in this forum...sorry for my english but i don't speak it very well... I have a problem with encoding of a MS Word file (with WebLogic Server 8.1.4).....I have this file stored in a DB Oracle like a BLOB...then I extract this file and I obtain the bytes of this file....than i write this byte in my ServletOutputStream so that i can see this word document from my jsp page in word format....until now everithing is ok...MS Word is open....but in the file the character are not encoded....are like this "�� ��� � ���������� "....... why i can't see it correctly??? What I don't understand is thas: 1)in the same page with a pdf (even this extract as byte from oracle column BLOB) works fine 2)with the same web application deployed on a tomcat server everithings work fine (with doc,xls....) 3)I think that every settings is ok.... in the jsp file response.setContentType("application/msword"); response.setHeader("Content-Disposition", "attachment; filename=test.doc"); in web.xml <mime-mapping> <extension>doc</extension> <mime-type>application/msword</mime-type> </mime-mapping> in weblogic.xml (I have read this in a forum) <jsp-descriptor> <jsp-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </jsp-param> <jsp-param> <param-name>compilerSupportsEncoding</param-name> <param-value>false</param-value> </jsp-param> </jsp-descriptor> The file that i obtain is not encode but is corret....infact if i make a compare (with a program "Beyond Compare" that meka a compare with the character not encoded like "�� ��� � ���������� ") between the file that I obtain and the original file....everithing is equal...so the file is ok....but i can't open this correctly and visualize it correctly in word format! Please help me.....thanks so much
|
 |
mattia sarto
Greenhorn
Joined: Feb 01, 2008
Posts: 5
|
|
|
I don't know it happens (certainly my error)....but sorry for my double post!!!
|
 |
mattia sarto
Greenhorn
Joined: Feb 01, 2008
Posts: 5
|
|
|
I don't know it happens (certainly my error)....but sorry for my double post!!!
|
 |
 |
|
|
subject: WebLogic Server - Problem encoding file MS Word in jsp
|
|
|