Thank you very much! You showed me how to save an image. I was been search for this for a week! You made my submission possible!
@TechTutorialCN
3 жыл бұрын
I am glad that it’s helpful to you 🥰
@mobinalizadeh4843
Ай бұрын
Thanks a lot , very useful
@vihangachamod5528
3 жыл бұрын
very usefull video, thankYou very much,i wish you every thing be succes!!!
@TechTutorialCN
3 жыл бұрын
Thank you so much 😊
@gajeshtripathi5721
3 жыл бұрын
is.read(byt); //instead of is.read();
@hungtruong3799
2 жыл бұрын
Nice brooo!!!
@erafif17
3 ай бұрын
thanks bro it works now
@ideolinoagostinho1612
Жыл бұрын
Voltei para apontar onde está o erro que todo mundo está falando e o motivo das imagens não abrirem depois do upload. A instância: is.read(); do método uploadFile, tem que receber a variável byt… ou seja, ela deve ficar desse jeito: is.read(byt).
@vinayakchidrawar7852
5 ай бұрын
hey i want to get the name of user & img at same time i have already used this but my code is showing null null values why? and if not null then it is showing nothing? plz help
@TechTutorialCN
5 ай бұрын
Sorry I didn’t get your point.
@guillermopalaciosgaray
3 жыл бұрын
Great Tutorial! I had some issues like the persons in the comments but in general it is a good video
@TechTutorialCN
3 жыл бұрын
Thanks for your comment. It's sorry to hear from you are getting an issue. I hope it solved. If not feel free to comment.
@bhumitselokar4724
3 жыл бұрын
@@TechTutorialCN what to do if you wanna save this file to your projects web Content
@TechTutorialCN
3 жыл бұрын
I didn’t get you properly.
@bhumitselokar4724
3 жыл бұрын
@@TechTutorialCN i want to upload this files to -webcontent --file folder in my project I am working in eclipse
@TechTutorialCN
3 жыл бұрын
getServetContext().getRealPath() it will return your web content folder
did you create the folder name "files" in your directory?
@TechTutorialCN
4 жыл бұрын
Please check that you create the folder in your web directory
@TechTutorialCN
4 жыл бұрын
@@mihigoyves what's the issue again?
@guillermopalaciosgaray
3 жыл бұрын
Same issue! I did it this way String path= getServletContext().getRealPath("/Files"+File.separator+fileName); but I sends the data to another directory and once the date is in that directory I could not open anything
@akashdeshmukh4310
3 жыл бұрын
@@TechTutorialCN same issue..its returning null
@sonabasak6999
4 жыл бұрын
Hello can u make a video of how to populate one drop down list based on a previous drop down list that fetched its value from database. Example: country and state.. And those option values should come from the database. Using only jsp and javascript and mysql. Please it is urgent. Searching for this since a long but nothing helped. Thanks!
@TechTutorialCN
4 жыл бұрын
Hey, thanks for your comment. I will upload it as soon as possible.
@rizwansiddiqui198
4 жыл бұрын
Very thanksfull bro
@TechTutorialCN
4 жыл бұрын
glad to hear from u. I wish you subscribe to my channel.
@tanmoybanerjee761
3 жыл бұрын
Thank you soo much!!
@TechTutorialCN
3 жыл бұрын
You are welcome
@atLe-gb5qd
2 жыл бұрын
Hello, thank u for the tutorial. I uploaded the xml file that have tags and contents but after that I checked the file which is empty, the file has nothing in it. Can you help me pls. Thank u
@TechTutorialCN
2 жыл бұрын
My May mention the char type
@shubhangigujar9872
6 ай бұрын
where is the database connection and where you upload data in database sir
@TechTutorialCN
6 ай бұрын
File uploaded in a files directory
@akadeadahot7067
4 жыл бұрын
sir i have upload the file in directory of eclipse but it showing looks like don't support format so what can i do im trying since 4 days
@TechTutorialCN
4 жыл бұрын
Think there is an issue with file read and write. you can share your GitHub resource. I will take a look.
@akadeadahot7067
4 жыл бұрын
@@TechTutorialCN im unable to push the project to git hub resource here im sending the code String filename=part.getSubmittedFileName(); String path=getServletContext().getRealPath("img"+File.separator+"products"+File.separator+filename); System.out.println(path); InputStream is=part.getInputStream(); byte [] data=new byte[is.available()]; is.read(); FileOutputStream fos= new FileOutputStream(path); fos.write(data); fos.flush(); fos.close();
@TechTutorialCN
4 жыл бұрын
Remove this line : System.out.println(path):
@akadeadahot7067
3 жыл бұрын
@@TechTutorialCN not i have solved that problem just have to add is.read(data); // pass here bytr array name to read the input thank u
@TechTutorialCN
3 жыл бұрын
@@akadeadahot7067 you are welcome
@zulfikharahmad2166
2 жыл бұрын
In my ECLIPSE IDE,I am unable to find getPart method ,due to which unable to upload file as explained in this video,please suggest
@TechTutorialCN
2 жыл бұрын
Please make sure that you choose jsp version 3.0 or above on project creation time.
@varnithareddy4866
2 жыл бұрын
@@TechTutorialCN where is that option available?
@deepikasrinivasasharma7481
4 жыл бұрын
can you add a code for an admin can upload videos/movies to the page and user can download them(only download.no stream able) . Something like a movie down-loader web page or Netflix
@TechTutorialCN
4 жыл бұрын
hi, dear thanks for your comment. in next video i will explain that. for that please subscribe my channel and turn notification to get the update.
@deepikasrinivasasharma7481
4 жыл бұрын
@@TechTutorialCN Hello sir. con you do this tutorial before 24th of April please . I really need this kind of a video before 25th for to do a project. Because of lockdown there is no one to help.
@TechTutorialCN
4 жыл бұрын
I will try my best. I am also working on my research paper. And extremely busy. But I will try to do that for you.❤️
@deepikasrinivasasharma7481
4 жыл бұрын
@@TechTutorialCN thankyou so much Sir
@bhumitselokar4724
3 жыл бұрын
Suppose their is a excel file to upload and save Excel files data to table in MySQL what to do
@TechTutorialCN
3 жыл бұрын
First you need to read the excel file data and then separate the data. Finally send those data to database according to the column name.
@aashishkatwal
4 жыл бұрын
Hello sir. I too uploaded the image using the same way and it got uploaded too. But I want to access the image from jsp using img tag and since the BUILD folder is not accessible from the IDE and after deployment of project using of absolute path can cause problems. So what is the solution to it??
@TechTutorialCN
4 жыл бұрын
You don’t need to use the build path folder. Use your regular folder location in your “web” directory. You can access those image if the image not present in that directory, but present in build directory.
@karanbadre5310
2 жыл бұрын
hello bhai file ka path null aa raha he mera plc kay karu me file uplode nahi ho rahi he
@TechTutorialCN
2 жыл бұрын
Please double check the context path
@avinashsatpute8100
3 жыл бұрын
Sir FileNotFoundExcption occurs File mane save database but img file not write in web project folder WebContent->img
@TechTutorialCN
3 жыл бұрын
please check your path string. and inputstream
@dangvangiangk16_hl17
2 жыл бұрын
thank u i did it ^^ but i can not open the file after moving it there . help me pls
@TechTutorialCN
2 жыл бұрын
What error you are getting?
@kushalpal1272
4 жыл бұрын
Where is the doPost method? Getting an error while using do post and calling process request.
@TechTutorialCN
4 жыл бұрын
Hi if you use netbeans it will create automatically doGet and doPost method below the procesrequest method. Or you can create doPost method by own self
@pranjalchourasiyagsmca1437
2 жыл бұрын
it is not working the path is showing null, how can i resolve it
@TechTutorialCN
2 жыл бұрын
Please check the context path and also the folder directory
@JunedKhan-ef8ih
2 жыл бұрын
Sir I m getting issues with image When I m openning image in folder it is no opening and snowing this format is not supported
@TechTutorialCN
2 жыл бұрын
You can use Apache common file upload jar file.
@lavanyam1762
2 жыл бұрын
I'm also facing this problem..I can't open the stored image file.. I'm using apache common file upload jar.
@nguyendinhtien5229
Жыл бұрын
if i upload the same file, how to delete existing file before write(file)
@TechTutorialCN
Жыл бұрын
Write a logic that will search the file if exist then delete, then upload the file
@nguyendinhtien5229
Жыл бұрын
I solved it. And another problem is when clean & build project it will delete image which i just upload. How to avoid delete image that just upload when clean & build
@udaykiran-ue2vw
2 жыл бұрын
Will it work in deployment so end users can upload any download files?
@TechTutorialCN
2 жыл бұрын
Yes 👍
@vadakkanchottanikara
3 жыл бұрын
Could u help me, user part android, server part jsp. How to upload image
@TechTutorialCN
3 жыл бұрын
You mean you want to upload image in android app development using java?
@vadakkanchottanikara
3 жыл бұрын
@@TechTutorialCN yes
@vadakkanchottanikara
3 жыл бұрын
@@TechTutorialCN could u pls help...
@TechTutorialCN
3 жыл бұрын
@@vadakkanchottanikara I have no practice with android since my 3rd year in university. I think the backend process will be the same.
@vadakkanchottanikara
3 жыл бұрын
No.. dear. Did u get time pls help
@muhammadshakir8998
Жыл бұрын
Sir, after i upload, then i go to the files and open the pdf, the pdf cannot be open
@TechTutorialCN
Жыл бұрын
Might be the stream was not converted properly.
@muhammadshakir8998
Жыл бұрын
@@TechTutorialCN then, how to fix it?
@TechTutorialCN
Жыл бұрын
Try another file and check if it's working or not.
@muhammadshakir8998
Жыл бұрын
@@TechTutorialCN other file also have the same problem such as pdf, image and others. How to fix ya?
@muhammadshakir8998
Жыл бұрын
help me sir
@sudipta7643
2 жыл бұрын
Sir please upload "update image file " video
@TechTutorialCN
2 жыл бұрын
Alright, I will.
@zhainhudan1566
2 жыл бұрын
Source Code please....
@venkateshjamdade7531
3 жыл бұрын
which jdk u working with
@TechTutorialCN
3 жыл бұрын
Java SE 13( JDK 1.8)
@manishamaji1201
4 жыл бұрын
Do we require any Jar files for running
@TechTutorialCN
4 жыл бұрын
No need any jar file.
@manishamaji1201
4 жыл бұрын
@@TechTutorialCN thanks for the information
@TechTutorialCN
4 жыл бұрын
Appreciate to help you. Don’t forget to subscribe 🙂
@pankajsahu6931
4 жыл бұрын
Sir file images open nhi ho rhi uploading ke baad
@pankajsahu6931
4 жыл бұрын
Sir file to ko display kaise kare images on JSP page
@TechTutorialCN
4 жыл бұрын
In webpage or in your computer?
@TechTutorialCN
4 жыл бұрын
@pankajsahu6931
4 жыл бұрын
Sir image upload karne ke baad ye corrupt ho ja rhi hai
@pankajsahu6931
4 жыл бұрын
Open hi nhi hori file
@nitinjangir9038
4 жыл бұрын
getSubmittedFileName mai error hai
@nitinjangir9038
4 жыл бұрын
Means error aa rhi hai
@TechTutorialCN
4 жыл бұрын
What’s the error you are getting?
@nitinjangir9038
4 жыл бұрын
@@TechTutorialCN thanks sir but i solved my wrror. This error because of my tomcat 7 and now i download the tomcat 8 😊
@karenolive8914
3 жыл бұрын
how can I retrieve the image to display it in a jsp page?
@TechTutorialCN
3 жыл бұрын
As usually you shoe image to html page. Use
@karenolive8914
3 жыл бұрын
@@TechTutorialCN yes. I need help with the path specifically. How will the image path look like An example would be great. Thanks
@TechTutorialCN
3 жыл бұрын
/folder-name/image-name.jpg like that
@karenolive8914
3 жыл бұрын
@@TechTutorialCN tried this and I get a 404 error.. Request not found. Yet the image has already been uploaded to the folder
@TechTutorialCN
3 жыл бұрын
Check the path properly. Go to your build folder to check if the image exists there or not.
Пікірлер: 118