Forums Register Login

Include servlet to read and print a file in html

+Pie Number of slices to send: Send
i want to read file name from a form text file and contents of the file from another text field
in one Servlet i want to write a file according to file name get by the form and save the contents.
now i want to include another servlet witch read that file and print in html formate

how it is possible
+Pie Number of slices to send: Send
 

i want to read file name from a form text file and contents of the file from another text field


Is it file or field?? If its field, then it shouldn't be much of a problem (its not a problem the other way too), you can use ServletContext.getRealPath("/path.ext") to write to the file and ServletContext.getResourceAsStream to read the file.

now i want to include another servlet witch read that file and print in html formate


Shouldn't it be which
+Pie Number of slices to send: Send
Hi sharjeel,

As ankit told, this is definitely possible. Kindly let us know the specific area where you are facing issues.
Heroic work plunger man. Please allow me to introduce you to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1443 times.
Similar Threads
read contents of a textarea and an uploaded file simultaneously
file-servlet-jsp-file
Multipart Upload - where does my file go?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:54:08.