Tiana,

// static method File.createTempFile() will produce a File Object
representing a UNIQUE File. You pass a 3rd parameter (File dir) if you want
to specify a certain directory.

File f = File.createTempFile("jspGen", "*.html");
String strFilename = f.getAbsolutePath();

Lee

>From: Tiana Zhang <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>     reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: How to generate unique filename each time run the jsp
>Date: Fri, 12 May 2000 13:29:05 -0500
>
>Hello, I need suggestion for the following task:
>
>I have a jsp(jsp1) page which is gonna to invoke some other program, the
>result
>is that jsp1 is gonna to create an Html file. This file will be loaded by
>another jsp(jsp2) file. My problem is how can I make the name of this html
>file
>unique (i can specify the name anyway I wanted). The reason I want to do
>this is
>to avoid two users run the jsp1 file at the same time and write to the same
>html
>file. After jsp2 loaded the corresponding html file, this file will be
>deleted.
>
>
>Any suggestion?
>
>Thanks a bunch.
>
>Tiana
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to