It's a report and the requirement I'm trying to satisfy is that you
have to be able to save it as a MS Word *.doc file. What I've
discovered is that you can take a stand-alone html file (i.e. no
external files like images or CSS etc. ) change the file extension
from *.html to *.doc and double clicking opens it in Word without any
trouble.

So... question is how do I get Struts 2 to cooperate with this
ideology? I'm thinking, click on a link to some kind of pseudonym for
the same report and then test in the action that prepares the report
to see where the user is coming from.  I suppose I could differentiate
this by setting a parameter in the urls in question. After I know
where they are coming from, I can choose to set these headers:

Content-Type to "application/msword"
and
Content-Disposition to "filename=someFileName.doc"

Hmmm.... that last one may solve my file name problem.

Anyway, I'm guessing here. I've never done this before. Anybody see
anything wrong with this? Does Struts provide an easier way or some
helpful tools that I should know about?


Jim C.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to