You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Madel,Kurt" <km...@csmi.com> on 2002/11/20 17:26:44 UTC

Question About Modules

My understanding is that you have to use an extension mapping in order to
use the Module functionality, i.e. '*.do'

What are people doing if they need to serve say a '.pdf' from an action?
That is, my pdf is dynamic and requires the use of the same DAO's that I use
for my jsp pages.  Sure you can set the mime type, but Internet Explorer
ignores these most of the time and counts on the extension.  If you map
*.pdf and *.do then you won't be able to server static pdf's???

Kurt Madel
Programmer, CSMi
(703) 823-4300 ext. 170




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Question About Modules

Posted by Antoni Reus <an...@wanadoo.es>.
Hi,

A Dimecres 20 Novembre 2002 17:26, Madel,Kurt va escriure:
> My understanding is that you have to use an extension mapping in order to
> use the Module functionality, i.e. '*.do'
>
> What are people doing if they need to serve say a '.pdf' from an action?
> That is, my pdf is dynamic and requires the use of the same DAO's that I
> use for my jsp pages.  Sure you can set the mime type, but Internet
> Explorer ignores these most of the time and counts on the extension.  If
> you map *.pdf and *.do then you won't be able to server static pdf's???
>
> Kurt Madel
> Programmer, CSMi
> (703) 823-4300 ext. 170

You can suggest a file name to the browser setting the Content-Disposition 
header  (RFC 2183)

String fileName = "theFile.pdf"
response.setContentType("application/pdf");
response.setHeader("Content-Dispostion", "inline; filename=" + fileName);



Salut!

-- Antoni Reus

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>