RE: Set the file name in html:file

2005-08-23 Thread karthikeyan.varadarajan

S. it is true. The browsers won't allow you to set the name of the file.


The user have to select the file name using the browse button.

Thanks
Regards
V.Karthi

-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 23, 2005 11:09 AM
To: Struts Users Mailing List
Subject: Re: Set the file name in html:file


Browsers don't allow you to set a file name, as it could be a security
risk

eg set file name to be c:\windows\someimportantfile.txt then get the
form to auto submit and send the file to the server

Anuradha S.Athreya wrote:

>Hello,
>
>In the JSP, I need to set the default file name in the JSP.
>I'm using  html:file taglib.
>I'm retrieving the file name (to be set) from a bean. What is the
syntax for
>this?
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> 
>

--
Jason Lea





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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



RE: Set the file name in html:file

2005-08-23 Thread Dharmendra . Sharan
Hi,

  If I understood you correctly, you are trying to have a default filename when 
you click download from within your application. In this case here's how it may 
be done:-

response.setContentType("application/ms-excel"); // or whatever the content 
format is...
response.setHeader("Content-Disposition", "inline; filename=ShipmentReport" + 
accountNbr + ".xls");
  
   where "response" is reference to the HttpServletResponse, and "accountNbr" 
is just a local variable to distinguish between different version reports (if 
any!)

  HTH,

  Dharmendra
ps: have a good day!
-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 23, 2005 1:39 AM
To: Struts Users Mailing List
Subject: Re: Set the file name in html:file


Browsers don't allow you to set a file name, as it could be a security risk

eg set file name to be c:\windows\someimportantfile.txt then get the 
form to auto submit and send the file to the server

Anuradha S.Athreya wrote:

>Hello,
>
>In the JSP, I need to set the default file name in the JSP. 
>I'm using  html:file taglib.
>I'm retrieving the file name (to be set) from a bean. What is the syntax for
>this?
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>

-- 
Jason Lea



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


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



Re: Set the file name in html:file

2005-08-22 Thread Jason Lea

Browsers don't allow you to set a file name, as it could be a security risk

eg set file name to be c:\windows\someimportantfile.txt then get the 
form to auto submit and send the file to the server


Anuradha S.Athreya wrote:


Hello,

In the JSP, I need to set the default file name in the JSP. 
I'm using  html:file taglib.

I'm retrieving the file name (to be set) from a bean. What is the syntax for
this?




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


 



--
Jason Lea



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