You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Huynh Ngoc Huy <hu...@yahoo.com> on 2002/11/16 04:38:26 UTC

The content of tag

  Dear group,
  How can we get the content of the <html:file> struts
tag ?
  Thanks,
  Huy


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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


RE: The content of tag

Posted by Andrew Hill <an...@gridnode.com>.
I reckon you should be allowed to specify a file, but of course the browser
should prompt the user for permission first. Alas the PTB see things
differently...

Of course Ive yet to meet a user who actually reads a dialog box before
hitting ok, but the onus of responsibility would have been shifted to their
head so its their problem if something bad happens ;-)

<btw>
Id take the oxen. I'd have enough trouble keeping one chook in line never
mind 1024...
</btw>

-----Original Message-----
From: James Mitchell [mailto:jmitchtx@telocity.com]
Sent: Monday, November 18, 2002 12:14
To: Struts Users Mailing List
Subject: RE: The content of <html:file> tag


You cannot set a default value for a file input.

This is for security reasons.
Think about it.  The web just wouldn't be same if:

 <input type="file"
        name="whatever"
        value="C:\winnt\something\really\important.dat"
        style="display:none">



James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -----Original Message-----
> From: Huynh Ngoc Huy [mailto:huyhngoc@yahoo.com]
> Sent: Sunday, November 17, 2002 9:56 PM
> To: Struts Users Mailing List
> Subject: Re: The content of <html:file> tag
>
>
>   Because I've thought that there's no way to do that.
> Is that right?
>   Huy
>
> --- Dan Tran <da...@hotmail.com> wrote:
> > Just curious, why do want to have a default value
> > for html:file?
> > Do you expect most likely that the user would enter
> > same full path name of
> > the client side file?
> > -Dan
> > ----- Original Message -----
> > From: "Huynh Ngoc Huy" <hu...@yahoo.com>
> > To: "Struts Users Mailing List"
> > <st...@jakarta.apache.org>
> > Sent: Sunday, November 17, 2002 4:31 PM
> > Subject: Re: The content of <html:file> tag
> >
> >
> > >   Dear,
> > >   How can I set the initial value for <html:file>
> > tag?
> > >   Thanks,
> > >   Huy
> > >
> > > --- "Craig R. McClanahan" <cr...@apache.org>
> > wrote:
> > > >
> > > >
> > > > On Fri, 15 Nov 2002, Huynh Ngoc Huy wrote:
> > > >
> > > > > Date: Fri, 15 Nov 2002 19:38:26 -0800 (PST)
> > > > > From: Huynh Ngoc Huy <hu...@yahoo.com>
> > > > > Reply-To: Struts Users Mailing List
> > > > <st...@jakarta.apache.org>
> > > > > To: struts-user@jakarta.apache.org
> > > > > Subject: The content of <html:file> tag
> > > > >
> > > > >   Dear group,
> > > > >   How can we get the content of the
> > <html:file>
> > > > struts
> > > > > tag ?
> > > > >   Thanks,
> > > > >   Huy
> > > > >
> > > >
> > > > You might want to look at the source code for
> > the
> > > > "struts-upload.war"
> > > > example application to get a feel for the ways
> > you
> > > > can do this.
> > > >
> > > > Craig
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > >
> > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > > <ma...@jakarta.apache.org>
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Web Hosting - Let the expert host your site
> > > http://webhosting.yahoo.com
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



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


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


RE: The content of tag

Posted by James Mitchell <jm...@telocity.com>.
You cannot set a default value for a file input.

This is for security reasons.
Think about it.  The web just wouldn't be same if:

 <input type="file"
        name="whatever"
        value="C:\winnt\something\really\important.dat"
        style="display:none">



James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -----Original Message-----
> From: Huynh Ngoc Huy [mailto:huyhngoc@yahoo.com]
> Sent: Sunday, November 17, 2002 9:56 PM
> To: Struts Users Mailing List
> Subject: Re: The content of <html:file> tag
>
>
>   Because I've thought that there's no way to do that.
> Is that right?
>   Huy
>
> --- Dan Tran <da...@hotmail.com> wrote:
> > Just curious, why do want to have a default value
> > for html:file?
> > Do you expect most likely that the user would enter
> > same full path name of
> > the client side file?
> > -Dan
> > ----- Original Message -----
> > From: "Huynh Ngoc Huy" <hu...@yahoo.com>
> > To: "Struts Users Mailing List"
> > <st...@jakarta.apache.org>
> > Sent: Sunday, November 17, 2002 4:31 PM
> > Subject: Re: The content of <html:file> tag
> >
> >
> > >   Dear,
> > >   How can I set the initial value for <html:file>
> > tag?
> > >   Thanks,
> > >   Huy
> > >
> > > --- "Craig R. McClanahan" <cr...@apache.org>
> > wrote:
> > > >
> > > >
> > > > On Fri, 15 Nov 2002, Huynh Ngoc Huy wrote:
> > > >
> > > > > Date: Fri, 15 Nov 2002 19:38:26 -0800 (PST)
> > > > > From: Huynh Ngoc Huy <hu...@yahoo.com>
> > > > > Reply-To: Struts Users Mailing List
> > > > <st...@jakarta.apache.org>
> > > > > To: struts-user@jakarta.apache.org
> > > > > Subject: The content of <html:file> tag
> > > > >
> > > > >   Dear group,
> > > > >   How can we get the content of the
> > <html:file>
> > > > struts
> > > > > tag ?
> > > > >   Thanks,
> > > > >   Huy
> > > > >
> > > >
> > > > You might want to look at the source code for
> > the
> > > > "struts-upload.war"
> > > > example application to get a feel for the ways
> > you
> > > > can do this.
> > > >
> > > > Craig
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > >
> > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > > <ma...@jakarta.apache.org>
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Web Hosting - Let the expert host your site
> > > http://webhosting.yahoo.com
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



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


Re: The content of tag

Posted by Huynh Ngoc Huy <hu...@yahoo.com>.
  Because I've thought that there's no way to do that.
Is that right?
  Huy

--- Dan Tran <da...@hotmail.com> wrote:
> Just curious, why do want to have a default value
> for html:file?
> Do you expect most likely that the user would enter
> same full path name of
> the client side file?
> -Dan
> ----- Original Message -----
> From: "Huynh Ngoc Huy" <hu...@yahoo.com>
> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> Sent: Sunday, November 17, 2002 4:31 PM
> Subject: Re: The content of <html:file> tag
> 
> 
> >   Dear,
> >   How can I set the initial value for <html:file>
> tag?
> >   Thanks,
> >   Huy
> >
> > --- "Craig R. McClanahan" <cr...@apache.org>
> wrote:
> > >
> > >
> > > On Fri, 15 Nov 2002, Huynh Ngoc Huy wrote:
> > >
> > > > Date: Fri, 15 Nov 2002 19:38:26 -0800 (PST)
> > > > From: Huynh Ngoc Huy <hu...@yahoo.com>
> > > > Reply-To: Struts Users Mailing List
> > > <st...@jakarta.apache.org>
> > > > To: struts-user@jakarta.apache.org
> > > > Subject: The content of <html:file> tag
> > > >
> > > >   Dear group,
> > > >   How can we get the content of the
> <html:file>
> > > struts
> > > > tag ?
> > > >   Thanks,
> > > >   Huy
> > > >
> > >
> > > You might want to look at the source code for
> the
> > > "struts-upload.war"
> > > example application to get a feel for the ways
> you
> > > can do this.
> > >
> > > Craig
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Web Hosting - Let the expert host your site
> > http://webhosting.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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


Re: The content of tag

Posted by Dan Tran <da...@hotmail.com>.
Just curious, why do want to have a default value for html:file?
Do you expect most likely that the user would enter same full path name of
the client side file?
-Dan
----- Original Message -----
From: "Huynh Ngoc Huy" <hu...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Sunday, November 17, 2002 4:31 PM
Subject: Re: The content of <html:file> tag


>   Dear,
>   How can I set the initial value for <html:file> tag?
>   Thanks,
>   Huy
>
> --- "Craig R. McClanahan" <cr...@apache.org> wrote:
> >
> >
> > On Fri, 15 Nov 2002, Huynh Ngoc Huy wrote:
> >
> > > Date: Fri, 15 Nov 2002 19:38:26 -0800 (PST)
> > > From: Huynh Ngoc Huy <hu...@yahoo.com>
> > > Reply-To: Struts Users Mailing List
> > <st...@jakarta.apache.org>
> > > To: struts-user@jakarta.apache.org
> > > Subject: The content of <html:file> tag
> > >
> > >   Dear group,
> > >   How can we get the content of the <html:file>
> > struts
> > > tag ?
> > >   Thanks,
> > >   Huy
> > >
> >
> > You might want to look at the source code for the
> > "struts-upload.war"
> > example application to get a feel for the ways you
> > can do this.
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

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


Re: The content of tag

Posted by Huynh Ngoc Huy <hu...@yahoo.com>.
  Dear,
  How can I set the initial value for <html:file> tag?
  Thanks,
  Huy

--- "Craig R. McClanahan" <cr...@apache.org> wrote:
> 
> 
> On Fri, 15 Nov 2002, Huynh Ngoc Huy wrote:
> 
> > Date: Fri, 15 Nov 2002 19:38:26 -0800 (PST)
> > From: Huynh Ngoc Huy <hu...@yahoo.com>
> > Reply-To: Struts Users Mailing List
> <st...@jakarta.apache.org>
> > To: struts-user@jakarta.apache.org
> > Subject: The content of <html:file> tag
> >
> >   Dear group,
> >   How can we get the content of the <html:file>
> struts
> > tag ?
> >   Thanks,
> >   Huy
> >
> 
> You might want to look at the source code for the
> "struts-upload.war"
> example application to get a feel for the ways you
> can do this.
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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


Re: The content of tag

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 15 Nov 2002, Huynh Ngoc Huy wrote:

> Date: Fri, 15 Nov 2002 19:38:26 -0800 (PST)
> From: Huynh Ngoc Huy <hu...@yahoo.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: The content of <html:file> tag
>
>   Dear group,
>   How can we get the content of the <html:file> struts
> tag ?
>   Thanks,
>   Huy
>

You might want to look at the source code for the "struts-upload.war"
example application to get a feel for the ways you can do this.

Craig


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