struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: file download problem in application server
Date Thu, 26 Mar 2009 14:37:48 GMT

I assume your blob Class is Serializable?
http://www.hibernate.org/hib_docs/v3/reference/en/html_single/
?
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
This message is confidential and may be privileged. If you are not the intended recipient,
we kindly ask you to  please inform the sender. Any unauthorised dissemination or copying
hereof is prohibited. This message serves for information purposes only and shall not have
any legally binding effect. Given that e-mails can easily be subject to manipulation, we can
not accept any liability for the content provided.






> Subject: RE: file download problem in application server
> Date: Thu, 26 Mar 2009 08:20:19 -0400
> From: andrewshannon@pqa.com
> To: user@struts.apache.org
> 
> I was half wrong.  It was a quirk for runnnig in OC4J but the Blob was
> being mangled coming out of the data base (which I had previously ruled
> out, doh).
> 
> Adding a property to the hibernate.properties file for:
> hibernate.jdbc.use_streams_for_binary=true
> 
> fixed my problem.  Otherwise file handling in struts 2 is a snap.  So
> thanks for that.
> 
> -----Original Message----- 
> Sent: Wednesday, March 25, 2009 9:26 AM
> To: user@struts.apache.org
> Subject: file download problem in application server
> 
> I posted this question on the OTN - OC4J list a second ago, but am
> hoping someone here might have some insight.
> 
>  
> 
> "I have a web app running in an OC4J stand alone 10.1.3.3 and am having
> a problem with downloading files over http. Its a struts2 app whose file
> downloading impl is easy to use and standard code for writing to an http
> servlet response output stream.
> 
> Using the firefox plugin for Live Headers I can see that the headers are
> correctly added to the servlet response and I do get the file I want.
> However the file has been mangled with binary output around the text.
> This is the case for txt, word, or any other file.
> 
> This problem does not occur in Jetty or Tomcat. I've also ruled out file
> corruption while going in/out of the database since I can upload a file
> when running oc4j, turn off oc4j, start up my app in Jetty and retrieve
> the same file just fine.
> 
> The mime types are all accounted for and the problem exists regardless
> if I use a specific content type or just application/download. My
> browsers (firefox and ie) also recognize all files from the content
> disposition value "attachment; filename=myfilename.ext". Its just the
> file content that some how has been wrecked on the way out of the
> container.
> 
> Has anyone experienced this? I only found one or two unanswered posts
> elsewhere.
> 
> How can this be mitigated?"
> 
>  
> 
> What I didn't include in the above post is that we're on s2 2.0.14, also
> that I put on my pirate hat and created a custom result type based on
> the StreamResult so that I could specifically set some additional
> response headers.  It all works great in a servlet container, but I'd
> like to know if you all have seen this problem in application servers
> like oc4j or jboss and if so what did you do to fix it?  I'm open to any
> suggestions.
> 
>  
> 
> Thanks a bunch,
> 
> Andrew
> 
>  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Internet Explorer 8 – Get your Hotmail Accelerated.  Download free!
http://clk.atdmt.com/MRT/go/141323790/direct/01/
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message