Go Back   Java Programming Forums > Java EE (Enterprise Edition) > Java Servlet


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2010, 07:57 PM
Junior Member
 

Join Date: Mar 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Puk284 is on a distinguished road
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>");
}



Reply With Quote Share this thread on Facebook
Sponsored Links
Java Training from DevelopIntelligence
  #2 (permalink)  
Old 13-04-2010, 08:13 AM
Junior Member
 

Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
jsatee is on a distinguished road
Default Re: Display file name

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to execute a simple display without a main method chronoz13 Java Code Snippets and Tutorials 5 13-01-2010 11:28 AM
display time kalees JavaServer Pages: JSP & JSTL 0 01-01-2010 11:40 AM
Help!how to get a graphical display of this game makarov What's Wrong With My Code? 1 17-12-2009 03:15 PM
[SOLVED] Need to display multiple images from database on a webpage. raghuprasad JavaServer Pages: JSP & JSTL 3 13-05-2009 08:15 AM
Display the content method? rocafella5007 What's Wrong With My Code? 1 30-04-2009 04:46 PM


100 most searched terms
Search Cloud
2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java addactionlistener addactionlistener java convert double to integer java double format java double to integer in java double to integer java drag en drop programmeren java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double in java format double java get mouse position java java 2d arraylist java actionlistener java double format java double formatting java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programming forum java programming forums java programming practice problems java send keystrokes to another application java two dimensional arraylist java.io.ioexception: premature eof java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton action jbutton actionlistener jtextarea font jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream programming mutators and generics smack api two dimensional arraylist two dimensional arraylist java unable to sendviapost to url what is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

All times are GMT. The time now is 01:53 AM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.