Creating a file on server, using Flash AS3 + PHP

I have a very simple PHP script that creates a new file on my server using a random number for the file name (e.g., 412561.txt).  When I load the script directly from a browser, it works.  But when I load the script from a very simple Flash (AS3) script, it does not work (i.e., doesn't create a file).  The Flash script and PHP script are both in the same directory.  Permissions on the directory and its content are 755.  Temporarily setting those permissions to 777 does not solve the problem (i.e., PHP still doesn't create file when called via Flash).
Here is my phpinfo.
Here is the PHP file.
The contents of the PHP file are:
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
$RandomNumber = rand(1,1000000);
$filename = "$RandomNumber" . ".txt";
$filecontent = "This is the content of the file.";
if(file_exists($filename))
          {$myTextFileHandler = fopen($filename,"r+"); }
else
          {$myTextFileHandler = fopen($filename,"w"); }
if($myTextFileHandler)
          {$writeInTxtFile = @fwrite($myTextFileHandler,"$filecontent");}     
fclose($myTextFileHandler);   
?>
Here is the html container for the Flash script.  The Flash script features a single button which calls the PHP script when pressed.  In case it helps, here is the raw Flash file itself.  The code of the Flash script is as follows:
stop();
var varLoader:URLLoader = new URLLoader;
var varURL:URLRequest = new URLRequest("http://www.jasonfinley.com/research/testing/TestingSaveData.php");
btnSave.addEventListener(MouseEvent.CLICK,fxnSave);
function fxnSave(event:MouseEvent):void{
          btnSave.enabled=false;
          varLoader.load(varURL);
Directory listing is enabled at the parent directory here, so you can see there when a new text file is created or not.  (Um, if this is a security disaster, please let me know!)
Can anyone please help me understand why this isn't working and how I can fix it?  Thank you
~jason

#1, Yes that is a security risk, please disable directory index viewing.
#2, Always validate. I see no issue with the code you're using but clearly it's not working. The way you find out is your trusty errors.
Make a new document (or paste this into your existing) where a button with the instance name btnSave is on screen:
// import required libs
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.MouseEvent;
import flash.events.SecurityErrorEvent;
import flash.text.TextField;
// assign handler
btnSave.addEventListener(MouseEvent.CLICK, fxnSave);
// make a textfield to display status
var tf:TextField = new TextField();
addChild(tf);
tf.width = stage.stageWidth;
tf.height = 300;
tf.multiline = true;
tf.wordWrap = true;
tf.selectable = false;
tf.text = "Loading...\n";
// just making sure the textfield is below the button
this.swapChildren(tf,btnSave);
function fxnSave(event:MouseEvent):void
    // disable button
    event.currentTarget.enabled = false;
    // new loader
    var varLoader:URLLoader = new URLLoader();
    // listen for load success
    varLoader.addEventListener(Event.COMPLETE, _onCompleteHandler);
    // listen for general errors
    varLoader.addEventListener(IOErrorEvent.IO_ERROR, _onErrorHandler);
    // listen for security / cross-domain errors
    varLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _onErrorHandler);
    // perform load
    varLoader.load(new URLRequest("http://www.jasonfinley.com/research/testing/TestingSaveData.php"));
// complete handler
function _onCompleteHandler(e:Event):void
    tf.appendText("Load complete: " + e);
// error handler
function _onErrorHandler(e:Event)
    if (e.type == SecurityErrorEvent.SECURITY_ERROR)
        tf.appendText("Load failed, Security error: " + e + " type[" + e.type + "]");
    else if (e.type == IOErrorEvent.IO_ERROR)
        tf.appendText("Load failed, IO error: " + e + " type[" + e.type + "]");
I get a Event.COMPLETE for mine, so the PHP script is definitely firing. Change the URL to something invalid and you'll see the IOErrorEvent fire off right away.
That leaves you to diagnose the PHP script. Check your error_log and see what is going wrong. You're suppressing errors on your file write which doesn't help you locate the issue saving the file. If you want to handle errors yourself you should do the usual try/catch and handle the error yourself (write a debug log file, anything).

Similar Messages

  • Creating file in server using 10g database and forms6i(unix operating syst

    I want to create a text file in server using(thin client)
    d2k 6i
    open 'a' mode
    then line by line put
    fil_name like /a1/a2/a3.txt
    Thanks
    Reena

    You might use the UTL_FILE-Package to create a file on the database server. But you must be aware of the following fact : UTL_FILE_DIR parameter must be set on the instance level pointing to the directory where you write the files on. The files will be owned by user "oracle".

  • How to over write a file on server using Dataset

    Hello Experts,
    Iu2019ve trying to write a code to fetch data in my program and create a file on server. My program work fine. However every time I run my program it append data at the end of the tile which it created 1st time. I donu2019t want this to happen. I want to new record to print on this file or in other words I want it to over write the file. Here is my code of dataset part.
    open dataset file for appending in text mode encoding default.
    if sy-subrc ne 0.
      write:/ 'File Opening/Creation Error'.
        exit.
    endif.
    loop at ivbrk.
      clear record.
        move ivbrk-headr to record+1(1).
        move ivbrk-vbeln to record+3(10).
        move ivbrk-waerk to record+15(5).
        move ivbrk-knumv to record+22(10).
        move ivbrk-fkdat to record+34(8).
        move ivbrk-kunrg to record+43(10).
        move ivbrk-kunag to record+54(10).
          transfer record to file.
        loop at ivbrp where vbeln = ivbrp-vbeln.
         clear items.
          move ivbrp-items to items+1(1).
          move ivbrp-posnr to items+3(6).
          move ivbrp-fkimg to items+11(13).
          move ivbrp-vrkme to items+25(3).
          move ivbrp-meins to items+30(3).
          move ivbrp-ntgew to items+34(15).
          move ivbrp-brgew to items+50(15).
          move ivbrp-gewei to items+66(3).
            transfer items to file.
        endloop.
    endloop.
    close dataset file.
    Can please somebody tell me what change I should make to over write on this file?
    Thanks a lot in advance.
    Moderator message - Please use code tags around your code
    Edited by: Rob Burbank on Jan 12, 2010 5:08 PM

    Hey zero:
    open dataset file for appending in text mode encoding default.
    Probably because you're opening it for appending.
    Rob

  • Creating a file to be used by report ROIUH_LOAD_JEINTF for journal entry

    Hello everyone,
    My doubt is related to the PRA module -
    I have to create a file to be used by program ROiUH_LOAD_JEINTF for journal entry creation. There are other programs also creating a similar file to what I am expected to create.
    When I observe the existing programs, they have not used OPEN DATASET statement, instead directly used the TRANSFER dataset and then CLOSE DATASET.
    What that does is it creates a file on the app server in a different format with only 1 line even if there may be like 10 lines of journal entry. The file mainly contains # which seems like some internal coding by the system.
    When I tried using the OPEN DATASET statement, it wrote all the lines to the app server that were there in my internal table.
    However, when I do not use the OPEN DATASET statement, it creates a file with just one line and maily # instead of the actual data from internal table.
    Can any one explain what difference does it make to the system when we do not use the OPEN DATASET statement.
    You help would be highly appreciated.
    Thanks and Regards,
    Shipra.

    Hello Satish,
    Thank you for your response.
    I think I was not clear enough about my doubt. I do not have any confusion about what OPEN DATASET would do.
    In my case, there is a file being written to the app server without using an OPEN DATASET for OUTPUT statement. The Z program directly calls a TRANSFER statement.
    The file that is created on the app server looks like:
    7042008-11-01                   000200100840 ######RD##################203               #### #####10012888                #####RI01            MC3                                                                               
    This file is used by the program ROIUH_LOAD_JEINTF. There are several lines in the internal table for Journal Entry creation but only 1 line shows in the file. However, when you debug the program ROIUH_LOAD_JEINTF with the above filename, you would see that it takes up all the JE lines that were passed from the previous program (the Z program) which created this file.
    However, when I changed the Z program to have an OPEN DATASET statement, it had all the lines displayed in the file, the file was very readable.
    I just wanted to know how does the system write to app server when no OPEN DATASET statement is written in the program.
    Hope I am clear this time. Thanks again.
    Regards,
    Shipra.

  • Uploading a file to server using servlet (Without using Jakarta Commons)

    Hi,
    I was trying to upload a file to server using servlet, but i need to do that without the help of anyother API packages like Jakarta Commons Upload. If any class for retrieval is necessary, how can i write my own code to upload from client machine?.
    From
    Velu

    <p>Why put such a restriction on the solution? Whats wrong about using that library?
    The uploading bit is easy - you put a <input type="file"> component on the form, and set it to be method="post" and enctype="multipart/form-data"
    Reading the input stream at the other end - thats harder - which is why they wrote a library for it. </p>
    why i gave the restriction is that, i have a question that <code>'can't we implement the same upload'</code>
    I was with the view that the same can be implemented by our own code right?

  • Oracle 10g - Creating a new Application Server using standalone OC4J 10g

    I have some issues in creating a new app. server using standalone oc4j 10g 10.1.3 instance. After I created the app. server instance, I tested the connection and it says connection refused. I used the userid as oc4jadmin and the password as welcome. I am getting a message connection refused. For connection, I used the default hostname "localhost" and I didn't mention anything in the URL path.

    Thanks Steve..
    Here is what I am trying to do.. I want to create a new app server instance (i.e.) stand alone oc4j server, where I can deploy my web service and run a test.
    Oracle JDeveloper 10g:
    Under Connection Navigator, Application Server --
    1) Right click to 'Create New Application Server Connection'
    2) Connection type as 'Standalone OC4J 10 g 10.1.3',
    3) Username ==> oc4jadmin, Password ==>welcome, checked the Deploy password.
    4) Hostname: localhost RMI Port: 23791
    URL path: <<blank>>
    5) Test Connection ==> getting a error message...
    Error while getting remote MBeanServer for url: ormi://localhost:23791/default:
    Error reading application-client descriptor: Error communicating with server: Connection refused: connect; nested exception is:
         javax.naming.CommunicationException: Connection refused: connect [Root exception is java.net.ConnectException: Connection refused: connect]
    Any input you can provide would be of great help.

  • How to upload a file into server using j2ee jsp and servlet with bean?

    How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
    Anyone help me please!

    u don't need j2ee and struts to do file uploading. An example is as such
    in JSP. u use the <input> file tag like
    <input type="file"....>You need a bean to capture the file contents like
    class FileUploadObj {
        private FormFile srcFile;
        private byte[] fileContent;
        // all the getter and setter methods
    }Then in the servlet, you process the file for uploading
        * The following loads the uploaded binary data into a byte Array.
        FileUploadObj form = new FileUploadObj();
        byte[] byteArr = null;
        if (form.signFile != null) {
            int filesize = form.srcFile.getFileSize();
            byteArr = new byte[filesize];
            ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
            bytein.read(byteArr);
            bytein.close();
            form.setFileContent(byteArr);
        // Write file content using Writer class into the destination file in the server.
        ...

  • How to create/delete files from filesystem using PL/SQL ? UTL_FILE?

    Greetings,
    I will start by explaining what i intend to do.
    I have an application made in APEX. This application will have among other purposes the managment of pdf files which will reside in the filesystem.
    I have questioned the person in charge to keep the pdf files in the database and not in the filesystem but without success.
    So the pdf files reside in the filesystem and there is a record in a database table about them. A table keeps all info about the pdf, their location , size and name, creation date etc.
    The APEX application will have a mecanism to allow the deletion of the pdf files if an administrator decides.
    So it should be possible for an administrator to schedule the deletion of all pdf files whoe creation date is older than 2008 for example
    So, how can i achieve that?
    After some research i foudn about the UTL_FILE package which seems to have it takes to perform the task in issue.
    My idea was to have a script in the operating system which runs nightly and reads a file containing all file names of the pdf to be erased.
    The file which contains the names of the pdfs to be erased will be generated by the database a few minutes before.
    If there are no pds files to be erased than the file containing the names will simply be empty
    Are there any other viable solutions out there?
    And as for opening/creating the file withn the pdf names, i use:
    UTL_FILE.FOPEN (
    location IN VARCHAR2,
    filename IN VARCHAR2,
    open_mode IN VARCHAR2,
    max_linesize IN BINARY_INTEGER)
    RETURN file_type;
    And as for writing lines (a pdf name per line ), i use;
    UTL_FILE.PUT_LINE (
    file IN FILE_TYPE,
    buffer IN VARCHAR2,
    autoflush IN BOOLEAN DEFAULT FALSE);
    is there a better solution?
    thanks all.
    -> My Homepage <-
    Edited by: Igor Carrasco on Apr 14, 2009 3:11 PM
    Edited by: Igor Carrasco on Apr 14, 2009 3:12 PM

    Greetings,
    I have read that link above, some questions still though.
    I will provide some more information.
    -First the database is in a windows server.
    The windows server has a virtual drive mounted as z:\ <-- this points to a directory in virtual machine, i can manually access/create/delete files manually,i tested.
    -Second utl_file_dir is defined as * , in t that enough to cover mounted drives? ( i can't change the init.ora and reboot the db right now :( gotta wait.. )
    Do i explicitly have to define utfl_file_dir = z: ?
    -Third haven't had the chance to test it on linux or any other operating system, assuming a virtual unit is mounted successfully and that the issues above are solved i should be able to operate on any mounted drive whatever the os, right?
    Best regards

  • How to update content of a file on server using a Java Applet?

    Hi,
    I'm new to Java, and I have a task now to overwrite a text file on a server using an applet. I have written a piece of code which compiles but doesn't work. Can you please take a look at the code or give me another way to do it?
    Thanks.
    Code:
    import java.applet.Applet;
    import java.io.*;
    import java.net.*;
    public class test2 extends Applet{
    public void init() {
    StringBuffer buf = new StringBuffer();
    try {
         String output = "this is some string";
         URL aUrl = new URL (getCodeBase().toString() + "test.txt");
         System.out.println(aUrl);
         URLConnection con = aUrl.openConnection();
         con.setDoOutput(true);
         PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(con.getOutputStream())));
         out.println(output);
         out.close();
    catch (MalformedURLException mue) {
         System.out.println("improper url");
         mue.printStackTrace();
    catch (IOException e) {
         System.out.println("io exception");
         e.printStackTrace();
    }

    Ram.ViSolve wrote:
    869975 wrote:
    Thanks. I knew there would be a security issue, but I do not have sufficient knowledge to get around it. If you have a reference how to configure a server please post it here.You need to create Signed Applet. Because normally applets have some restriction to access the files in the client machine. Signed applets overrides the restriction.
    To know more, Read [url http://192.9.162.55/developer/onlineTraining/Programming/JDCBook/signed.html]Signed Applet
    No. Our OP wants to write to the server, not to the client! And to achieve this from an applet, you don't need it signed, iff the server is the machine from where the applet was downloaded in the first place. You only need to use a mechanism that allows you to write to servers, which HTTP is not. FTP, on the other hand, if setup properly can do it. So instead of trying to write using an HttpURLConnection (OP's attempt), you would use an FTP client library. FTP here is just an example and probably not the best way. Another option is to use some servlet or PHP or ASP on the server side and the applet will sumbmit the changes to that code on the server, which in turn will write to the file. The idea is that you need some 'partner code' on the server, be it the FTP server or the servlet/PHP/ASP code. None of this requires the applet to be signed.

  • Creating PDF file in XI using iText

    Hi all,
    I am trying to create a PDF file in XI using itext. The PDF file is getting created in my target ftp server but I am not able to open the PDF. It is throwing the below error while opening.
    "Adobe Reader could not open the sample.pdf because it is either not a supported file or because the file has been damaged(for example,it was sent as an e mail attachment and wasn't correctly decoded)"
    I am using the below code in my udf
    String filename= "Sample.pdf";
    try
    Document document= new Document();
    PdfWriter pdfwriter=PdfWriter.getInstance(document,new FileOutputStream(filename));
    document.open();
    document.add(new Paragraph("Hi How are you?"));
    document.close();
    DynamicConfiguration conf = (DynamicConfiguration) container
           .getTransformationParameters()
           .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key,filename);
    catch(Exception e)
    return "";
    Kindly let me know if you have any information on this.
    With Regards
    jaisu.
    Edited by: jaisu118 on Feb 12, 2010 8:04 AM

    hi,
    I had used custom adapter module for creating the PDF file.
    you have to use java mapping if you want to create pdf without using adapter module.
    You need to import iText library available at http://itextpdf.com/.
    How to use external jar files ??
    External Jar files in UDF
    code may look like this:
    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.Reader;
    //1. AbstractTransformation class is imported.
    // The associated jar file is: com.sap.xpi.ib.mapping.lib.jar
    import com.sap.aii.mapping.api.AbstractTransformation;
    import  com.sap.aii.mapping.api.DynamicConfiguration;
    import com.sap.aii.mapping.api.DynamicConfigurationKey;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    import com.sap.aii.mapping.api.InputHeader;
    public class xyz extends AbstractTransformation {
    public void transform(TransformationInput inp, TransformationOutput out) throws StreamTransformationException {
         getTrace().addInfo("JAVA Mapping Called");
                         InputStream inData = inp.getInputPayload().getInputStream();
                        // pdf conversion code
                        out.getOutputPayload().getOutputStream().write(outData.getBytes("UTF-8"));
    check http://help.sap.com/javadocs/pi/SP3/xpi/index.html for java mapping api.
    Thanks.

  • Controlling External Captivate 5 swf using flash AS3

    Hi,
    I have created a basic Flash AS3 interface in which I am trying to control the navigation (next slide / previous slide) of an external captivate 5 swf which I have added using a loader, but i cant work out the solution.
    My code is currently as follows:
    import flash.net.URLRequest;
    var Xpos: Number = 96
    var Ypos: Number = 94
    var my_loader:Loader = new Loader();
    my_loader.load(new URLRequest("content.swf"));
    my_loader.x = Xpos;
    my_loader.y = Ypos;
    addChild(my_loader);
    stop();
    nextBut.addEventListener(MouseEvent.MOUSE_UP,gotonextframe);
    function gotonextframe(event:MouseEvent){
    MovieClip(my_loader.content).rdcmndNextSlide();
    Any help would be much appreciated,
    thanks
    Dez

    Thats perfect, thanks for the reply, much appreciated!
    I guess you have tried:
    rdcmndRewindAndStop
    Set to 1 to rewind and stop the project.

  • Can't upload files in Firefox, using flash uploader. Already reinstalled flash, works ok in Chrome.

    I have a website where I can upload files to the site's server utilizing Flash - I have the latest Firefox and the latest Flash plugin (uninstalled and reinstalled). But the upload is failing - I only get an "Unknown I/O message. but only in Firefox - Works ok in Chrome. I have already run the Adobe uninstall/reinstall process, and I have also tried running Firefox in Safe Mode and the problem persists.

    Hi Bilinbaja,
    I am not sure if you are using FTP to upload the files, however this error can sometimes refer to a hardware issue. Please try to toggle the hardware acceleration by right clicking on a item using the flash plug in and selecting settings.
    Please let us know if this improves the performance as well as if this also happens on other computers, or if it still happens after you delete cache and cookies. Each browser has its own cache, Firefox's cache may also be longer. [[How to clear the Firefox cache]]
    Did this help? We look forward to your reply.

  • Uploading a file to server using ajax and struts

    My problem is i wrote a program to upload a file to the server using Ajax.
    Here iam used Struts and Ajax.
    The problem is when iam uploaded a file from my PC the file is uploading to the server in the upload folder located in the server my system.
    Iam using Tomcat server 5.0
    But when iam trying to access it through other system it is not doing so
    Giving an internal server error i,e 500.
    Iam putting the necessary documents for ur reference.
    Plz help me soon .
    My exact requirement is i have to upload a file to the upload folder located in the server.
    And i have to get the path of that file and display the file path exactly below the browse button from where iam uploaded a file.
    That should be done without page refresh and submit thats y iam used Ajax
    Any help would greatly appreciated
    Thanks and Regards
    Meerasaaheb.
    The action class is FilePathAction
    package actions;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.*;
    public class FilePathAction extends Action{
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    String contextPath1 = "";
    String uploadDirName="";
    String filepath="";
    System.out.println(contextPath1 );
    String inputfile = request.getParameter("filepath");
    uploadDirName = getServlet().getServletContext().getRealPath("/upload");
    File f=new File(inputfile);
    FileInputStream fis=null;
    FileOutputStream fo=null;
    File f1=new File(uploadDirName+"/"+f.getName());
    fis=new FileInputStream(f);
    fo=new FileOutputStream(f1);
    try
    byte buf[] = new byte[1024*8]; /* declare a 8kB buffer */
    int len = -1;
    while((len = fis.read(buf)) != -1)
    fo.write(buf, 0, len);
    catch(Exception e)
    e.printStackTrace();
    filepath=f1.getAbsolutePath();
    request.setAttribute("filepath", filepath);
    return mapping.findForward("filepath");
    the input jsp is
    filename.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    <script type="text/javascript">
    alertflag = false;
    var xmlHttp;
    function startRequest()
    if(alertflag)
    alert("meera");
    xmlHttp=createXmlHttpRequest();
    var inputfile=document.getElementById("filepath").value;
    xmlHttp.open("POST","FilePathAction.do",true);
    xmlHttp.onreadystatechange=handleStateChange;
    xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlHttp.send("filepath="+inputfile);
    function createXmlHttpRequest()
    //For IE
    if(window.ActiveXObject)
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    //otherthan IE
    else if(window.XMLHttpRequest)
    xmlHttp=new XMLHttpRequest();
    return xmlHttp;
    //Next is the function that sets up the communication with the server.
    //This function also registers the callback handler, which is handleStateChange. Next is the code for the handler.
    function handleStateChange()
    var message=" ";
    if(xmlHttp.readyState==4)
    if(alertflag)
    alert(xmlHttp.status);
    if(xmlHttp.status==200)
    if(alertflag)
    alert("here");
    document.getElementById("div1").style.visibility = "visible";
    var results=xmlHttp.responseText;
    document.getElementById('div1').innerHTML = results;
    else
    alert("Error loading page"+xmlHttp.status+":"+xmlHttp.statusText);
    </script></head><body><form name="thumbs" enctype="multipart/form-data" method="post" action="">
    <input type="file" name="filepath" id="filepath" onchange="startRequest();"/>
    </form>
    <div id="div1" style="visibility:hidden;">
    </div></body></html>
    The ajax response is catching in a dummy.jsp
    <%=(String)request.getAttribute("filepath")%>
    corresponding action mapping
    <action path="/FilePathAction" type="actions.FilePathAction">
    <forward name="filepath" path="/dummy.jsp"/>
    </action>
    So plz help me to upload a file to the server from any PC.
    Iam searched alot but didnt get any solution.

    Plz help me soon if it possible so
    Iam in great need.
    I have worked alot but not worked out.
    Any help greatly appreciated

  • How to create a file in server's current directory

    hi,
    I have a project, but when i will run my program on internet Explorer then
    it will create a folder in server's current directory, but i will not specify
    drive & folder, it will create a folder in server's current directory, after that
    i will read file from that, what will be the solution of this ? Is there
    anyone who can give me solution? PLease help me
    With regards
    Nahar

    ServletContext context = session.getServletContext();
    String realContextPath = context.getRealPath(request.getContextPath());this will give you access to the servlets current directory
    from there you can create a file
    I dont know how much this will help

  • Creating a discussion board/forum using Flash

    Ok I checked the WWW and used search here but I keep ending up with dead ends or inactive sites. 
    Is it possible to create a forum using Flash?
    If yes, does anyone know a resource I can use or examples I can see?

    Ok so I'm still stuck on this issue now.  I have tried several forums flashkit.com all I got was a snotty response back:
    "Might the worst idea ever."
    Any help on whether or not message boards can be done?  IF so, what aspects of the design should I be aware of? Also, are there any resources??6

Maybe you are looking for