RE: ValidatorPlugin and Dynamic Action Forms?

2002-06-03 Thread Honman Lee

Hello,

Does struts have a taglib that will provide the functionality for a user to download 
from an output stream?  Thanks for you assistance.

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 4:21 PM
To: 'Struts Users Mailing List'
Subject: RE: ValidatorPlugin and Dynamic Action Forms?


Not ignoring you, Rick...I haven't used DynaActionForm (yet).

Mark

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 6:35 PM

Not trying to be a pest re-posting but maybe some gurus missed the
post..

I'm curious if anyone knows how to get a DynaActionForm configured to
uses struts validation?

I searched the archives here but only found someone else with the same
question which no one answered, so maybe it can't be done and I should
stick to a normal Action Form if I want to use the struts Validation?

Thanks lots



-- 

Rick
mailto:[EMAIL PROTECTED]

If you define cowardice as running away at the first sign of danger,
screaming and tripping and begging for mercy, then yes, Mr. Brave man,
I guess I'm a coward. 
  -Jack Handey


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: ValidatorPlugin and Dynamic Action Forms?

2002-06-03 Thread Craig R. McClanahan



On Mon, 3 Jun 2002, Honman Lee wrote:

 Date: Mon, 3 Jun 2002 16:43:59 -0700
 From: Honman Lee [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: RE: ValidatorPlugin and Dynamic Action Forms?

 Hello,


It's much friendlier to people who search the mailing list archives if you
start a new message thread (with a new subject) when you're going to ask a
different question.

 Does struts have a taglib that will provide the functionality for a user
 to download from an output stream?  Thanks for you assistance.


You don't really want a tag library for this purpose -- especially if your
output is a binary format (which you can't render directly from a JSP).

The usual approach is to set up an Action that calls
response.setContentType() appropriately, then calls
response.getOutputStream() and writes the binary output directly.
Finally, you can return null from the Action to indicate (to the
controller servlet) that the response has already been created, and that
no forwarding is necessary.

Alternatively, if your dynamic content is created by some other servlet,
you can just set up a forward to that servlet and let it do the work.
Or, if it's a static file, just make the context-relative path of that
file your forward path, and the container should send the output for
you.

Craig McClanahan


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]