This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Struts and the fly likes StreamResult changes file name during download on Mobile phone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "StreamResult changes file name during download on Mobile phone" Watch "StreamResult changes file name during download on Mobile phone" New topic
Author

StreamResult changes file name during download on Mobile phone

Kash reily
Greenhorn

Joined: Nov 16, 2009
Posts: 1
Hi,

I'm using Struts2 StreamResult to download a file to mobile phones as follows:


I set all the required parameters in my Action class. The content-disposition is set as follows:



If I assign binName to a string such as "ABC.1.0.0.cab", the downloaded file name displays correctly when downloaded to a desktop.
But on a mobile phone (Windows Mobile to be specific), the name is displayed as "ABC.1[1].0.0.cab. (There is no existing file on the device which has this filename). If I redirect to a url which points to the file to be downloaded (ABC.1.0.0.cab), the file downloaded shows the correct name on download.

Any idea on why the downloaded file name changes if I use result type="stream"?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: StreamResult changes file name during download on Mobile phone
 
It's not a secret anymore!