// select the row to update the BLOB column
pstmt = con.prepareStatement(sSelect);
pstmt.setString(1, primary_key);
rset = pstmt.executeQuery();
if (rset.next()) {
blob = ((OracleResultSet) rset).getBLOB(1);
} else {
status = "Error when extracting BLOB";
}
blob.trim(0);
out = blob.getBinaryOutputStream();
out.flush();
out.write(dataBytes, startPos, (endPos - startPos));
out.close();
Saving the Document(Docx) as BLOB Object into Database. downloading the docx properly, when Client and Server Machine is Windows XP/Windows 7 and ie7 /ie8. This is not working when Server is CentOS
I assume you are saying that when you use a Windows PC to access the web site that the docx file gets successfully downloaded to the Windows PC and Word can open it. So things are working fine on Windows.
What do you mean by "not working" on CentOS? Do you mean that nothing gets downloaded at all? Or does something get downloaded but its contents are not what you expected? Exactly what is the behavior you are seeing.
Also, which browser are you using on Windows and which on CentOS?
My guess is that it has something to do with the browser configuration. The only difference in the working case (Windows client) and non-working case (CentOS client) is that you are using a different browser. You might have to configure the browser on CentOS to recognize the mime type used for docx files and have the browser react correctly (that is, download the the file and place it on disk somewhere).
Server Details
OS = CentOS
Application Server = jboss-3.2.3
Client Details
OS : windows xp / vista /7
browser : ie6 / ie7 / ie8
When im opening the docx it is opening with client and server as windows environment. but it is opening the warning message as "the content of document was corrupted" and then opening the document.
Ram Dev chandran
Greenhorn
Joined: Sep 20, 2011
Posts: 4
posted
0
Hi Peter Johnson.
in Other words,
whatever it may be the server and client configuration, I need to download the doc / docx / xlsx kindly do the needful
When im opening the docx it is opening with client and server as windows environment. but it is opening the warning message as "the content of document was corrupted" and then opening the document.
I do not understand under what circumstances the download is working and under what circumstances the download is not working.
Ram Dev chandran
Greenhorn
Joined: Sep 20, 2011
Posts: 4
posted
0
The docx download is not working
---------------------------------------
Server Details
Operating System : CentOS
Application Server : Jboss
The docx download is working
----------------------------------
Server Details
Operating System : windows xp / vista / 7
Application Server : Jboss