Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Display file name

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Display file name

    Hi,

    I have a form linked to a servlet that uploads files. I would like the name of the file that has been uploaded to be displayed next to the <h3>line once it has been processed. I have no problems linking the servlet to the form or uploading the file. I simply want the name of the uploaded file to appear next to the word uploaded. Thank you for your help in advance.


    // Generate some sample HTML
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html><head><title>Fileupload</title></head>");
    out.println("<body>");
    out.println("<h3>Your file has been successfully uploaded</h3>");
    out.println("<h3>The following file was uploaded </h3>"); // Name of file should appear next to the word uploaded.
    out.println("</body>");
    out.println("</html>");
    }


  2. #2
    Junior Member
    Join Date
    Apr 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Display file name

    put the uploaded file in your application context and give me the link as http://usersitename.com/<directory>/<userfilename>

Similar Threads

  1. how to execute a simple display without a main method
    By chronoz13 in forum Java Theory & Questions
    Replies: 5
    Last Post: January 13th, 2010, 07:28 AM
  2. display time
    By kalees in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: January 1st, 2010, 07:40 AM
  3. Help!how to get a graphical display of this game
    By makarov in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 17th, 2009, 11:15 AM
  4. [SOLVED] Need to display multiple images from database on a webpage
    By raghuprasad in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: May 13th, 2009, 04:15 AM
  5. How to display the contents of my queue?
    By rocafella5007 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 30th, 2009, 12:46 PM