I have a Struts application and am running into a problem using the <logic:forward> tag in the application.
I use "welcome" jsp files that do nothing but immediately forward to a Struts action (a very common practice). This has been great, until now.
One of the recent actions I wrote has as its sole purpose the responsibility of reading a file of a particular type from another server and returning it to the requestor.
I successfully read the file in my action and write it to the response object for delivery to the requestor. That part works fine. The problem is that the <logic:forward> tag seems to have set up a state (lost session?) that prevents me returning the file with the specified mime-type and name. The file is downloaded using the name of the requesting URI and the mime-type blank instead of the mime-type and name I've set. If I use the <html:link forward> tag, however it works great. But it requires user intervention (not good!).
Here's some code displaying what I'm attempting to do:
<!-- download.jsp -->
<link:forward name="download">
A request of " attempts to download a file by the name of the above URI with unknown filetype.
** Whereas...
<!-- download.jsp -->
<html:link forward="download">Download</html:link>
** Works great!
Anyone have any ideas?
Thanks in advance!!!!
Jeff Small
I use "welcome" jsp files that do nothing but immediately forward to a Struts action (a very common practice). This has been great, until now.
One of the recent actions I wrote has as its sole purpose the responsibility of reading a file of a particular type from another server and returning it to the requestor.
I successfully read the file in my action and write it to the response object for delivery to the requestor. That part works fine. The problem is that the <logic:forward> tag seems to have set up a state (lost session?) that prevents me returning the file with the specified mime-type and name. The file is downloaded using the name of the requesting URI and the mime-type blank instead of the mime-type and name I've set. If I use the <html:link forward> tag, however it works great. But it requires user intervention (not good!).
Here's some code displaying what I'm attempting to do:
<!-- download.jsp -->
<link:forward name="download">
A request of " attempts to download a file by the name of the above URI with unknown filetype.
** Whereas...
<!-- download.jsp -->
<html:link forward="download">Download</html:link>
** Works great!
Anyone have any ideas?
Thanks in advance!!!!
Jeff Small