Thansk for the explain the but i got a error, "Error instantiating servlet class [sendemail.Userverify]" the discription is "The server encountered an unexpected condition that prevented it from fulfilling the request." can any one tell how to resolve this error? can u tell me sir?
For those who are getting this error '535 Authentication credentials invalid' write: pr.setProperty("mail.smtp.host", "smtp.gmail.com"); instead of : pr.setProperty("mail.smtp.host", "smtp.mail.com"); if you're using a google account for sending the code. It will work!
Yes, actually request dispatcher only work on requested scope. It’s work on limited area. But session is global. In verify page we are hitting our form to new servlet. And there you can’t access the request scope value you have set in previous servlet.
Dear Sir Thank you for this wonderful tutorial. I have one request, can you please make one video for below program - How to send mail to particular user based upon document expiry date using Java JSP Servlet. For Example I have written small code to upload file into Mysql database. File can be doc, excel, pdf and so on. While uploading document i have given Validity From Date and Validity End Date. Before expiration of document, mail should sent to user like your this this document is going to expire in suppose 5 days. So how to implement this
I have one more question jaja, sorry, Why do I need to use a new Authenticator in 19:39 ?, I have set it null and it works fine. I think that authentication is used to avoid a kind of authorization, idk
i follow your steps but when i run the project i got this message"Failed to send verification email " and i don't receive any email.Could you please help me with this
@@TechTutorialCN Hello Can you please upload a video about How to set Cookie on the client-side so that they do not need to login all-time like Remember me Using JSP and SERVLET
@@TechTutorialCN if I pay you then can you please teach me JSP, servlet, JDBC advance level or if you run any course then please Share the link , I am interested to buy
@@wpatyune1631 for gmail host property is "smtp.gmail.com" and smtp.port and socketfactory.port is 465. and don't forget to turn off two-step verification and less secure app.
@@TechTutorialCN i try but i don't work. in my project, if i import jakarta project run html but don't send email but if i import javax follow your code, project when run have issue: Type Rapport d'exception message Class [controller.UserVerify] is not a Servlet description Le serveur a rencontré une erreur interne qui l'a empêché de satisfaire la requête. exception jakarta.servlet.ServletException: Class [controller.UserVerify] is not a Servlet org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:356) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:867) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1762) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Unknown Source) Please help me, thank you!
SEVERE: Servlet.service() for servlet [project.Login] in context with path [/SSP_Project] threw exception [Servlet execution threw an exception] with root cause / java.lang.ClassNotFoundException: javax.mail.Authenticator can you plz help me out to resolve the issue ?
@@TechTutorialCN bro after entering user name and user email..bro...i clicked register and then only it stuck bro..just a white page...help me with this bro..
Help me, please. I do myself like the way you do but it fails to send email. Then i take your source code, it fails to send email too (but in video your code is still active). How can i do to solve this problem ?
@@hnhschannel2116 b kéo xuống bên cmt dưới có người chỉ lỗi 535 hay gì gì đó mà sửa mail thành gmail ấy. Vẫn chưa được nữa thì do gg nó không cho bật cái less secure app access, nên ko gửi được. Mình phải dùng mail edu thì mới gửi đc mail đi.
amazing video thank you so much! but i got this error : javax.mail.AuthenticationFailedException: 535 Authentication credentials invalid i'm sure that my username and password were correct (Less Secure App is ON ) i even tried to use other email services
Hi sir, Do you know what issue is this? type Exception report messageInternal Server Error descriptionThe server encountered an internal error that prevented it from fulfilling this request. exception java.lang.SecurityException: Access to default session denied i had tried a lot of solution but it doesn't worked. (Email address and password is correct, and jar is import, and im using app password)
Hi, Could you pealse check out this solution: stackoverflow.com/questions/11566772/java-mail-api-exception-thrown-saying-java-lang-securityexception-access-to-d
@@TechTutorialCN javax.mail.MessagingException: Can't send command to SMTP host; nested exception is: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
Thank you very much, it helped my project more perfect!
Very nice bro ..but trun on/off of the Google less secure setting is mondatary bro
For google security it’s recommended.
Thanks again for other amazing video! You have been helping me a lot, greetings from mexico
I am glad to help you.
Thansk for the explain the but i got a error, "Error instantiating servlet class [sendemail.Userverify]" the discription is "The server encountered an unexpected condition that prevented it from fulfilling the request." can any one tell how to resolve this error? can u tell me sir?
Thank You so much !!!, Great Video and Explanations
I am glad here to help you.
This help me a lot. Thank you so much!
Glad to hear that it helps you☺️
U save my life, thanks
You are welcome 🥰
Did exactly everything you've shown in the video... But when I click on Register I'm not getting any output why is that?
if you use gmail for security reason you won't get email
For those who are getting this error '535 Authentication credentials invalid'
write: pr.setProperty("mail.smtp.host", "smtp.gmail.com");
instead of : pr.setProperty("mail.smtp.host", "smtp.mail.com");
if you're using a google account for sending the code.
It will work!
It’s google security issue.
why are you retrieving the session 26:56?, you can do it with getRequestDispatcher("/verify.jsp").forward(request, response); no?
Yes, actually request dispatcher only work on requested scope. It’s work on limited area. But session is global. In verify page we are hitting our form to new servlet. And there you can’t access the request scope value you have set in previous servlet.
@@TechTutorialCN Oh! Really can't reach the previous value? I wanna test it :D, thanks for reply !
Fail to send verification code
Every thing I review exactly same ur explain
Also less secure app
I was changed it
Dear Sir Thank you for this wonderful tutorial. I have one request, can you please make one video for below program - How to send mail to particular user based upon document expiry date using Java JSP Servlet. For Example I have written small code to upload file into Mysql database. File can be doc, excel, pdf and so on. While uploading document i have given Validity From Date and Validity End Date. Before expiration of document, mail should sent to user like your this this document is going to expire in suppose 5 days. So how to implement this
I will upload it as soon as possible.
I have one more question jaja, sorry, Why do I need to use a new Authenticator in 19:39 ?, I have set it null and it works fine. I think that authentication is used to avoid a kind of authorization, idk
Yes it should work. Actually it’s return session which is helpful for debugging.
Thank you so much!
i follow your steps but when i run the project i got this message"Failed to send verification email " and i don't receive any email.Could you please help me with this
If you use gmail it’s your smtp connection issue.
@@TechTutorialCN same problem i am also getting "Failed to send verification email" please help me
Less secure app access is disable from 31 may 2022. Any alternative method to solve this. Also I got unknown host exception
Please use app password
@@TechTutorialCN now it's showing can't send command to host.
found any solution?
Hi, please enable two step verification and use app password from gmail.
@@TechTutorialCN thanks
I have one question, Why you did not map servlet in Web.xml file Please Reply
It’s do automatically or if you use annotations you don’t need to do configure web.xml file
@@TechTutorialCN Thank You, Actually, I use eclipse and in eclipse, we have to map every single servlet to the web.xml manually. that's why I asked
@@TechTutorialCN Hello Can you please upload a video about How to set Cookie on the client-side so that they do not need to login all-time
like Remember me Using JSP and SERVLET
@@SansaniKhabarlive hmm you can do it in two ways using cookies or local storage. I will try to upload it in my free time.
@@TechTutorialCN if I pay you then can you please teach me JSP, servlet, JDBC
advance level or if you run any course then please Share the link , I am interested to buy
Thanks for this great tutorial, it is god sends 🙏
I am really glad to hear from you.
@@TechTutorialCN Thanks, your source code didn't put gmail as a host property for the SMTP. :)
@@wpatyune1631 for gmail host property is "smtp.gmail.com" and smtp.port and socketfactory.port is 465. and don't forget to turn off two-step verification and less secure app.
thanks a lot, this helped a lot.........
I really appreciate that it helps you. I hope you subscribed to my channel😍
Sir when I use getCode() its showing it is undefined for the type User. Please help
Please check out the user class getters and setters method. Also double-check you set the code value properly.
OTP stored in database but not send to gmai......and shows also null pointer exception
Gmail has security issue to get smtp access from outside.
@@TechTutorialCN so sir what we do for that....
You can try other email services. Or from a free host service take a free webmail to use it your test project.
how to send email verification link using java servlet
Generate a has string store them in database. Then send the has to email. Validate the has on get request.
when i click send, i am still on the white page UserVerify, gmail is not sent, not change to verify.jsp, I have enabled security, please help me
Instead of using direct password please use app password from google.
@@TechTutorialCN i try but i don't work. in my project, if i import jakarta project run html but don't send email but if i import javax follow your code, project when run have issue:
Type Rapport d'exception
message Class [controller.UserVerify] is not a Servlet
description Le serveur a rencontré une erreur interne qui l'a empêché de satisfaire la requête.
exception
jakarta.servlet.ServletException: Class [controller.UserVerify] is not a Servlet
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:356)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:867)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1762)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)
Please help me, thank you!
i want use jakarta than javax, because i want integrated send email to my other project
Thanks a lot
You are welcome Vignesh
SEVERE: Servlet.service() for servlet [project.Login] in context with path [/SSP_Project] threw exception [Servlet execution threw an exception] with root cause
/
java.lang.ClassNotFoundException: javax.mail.Authenticator can you plz help me out to resolve the issue ?
Maybe you are trying with Gmail, and for security reasons it’s happening.
@@TechTutorialCN can't I use the code for gmail... Will I have to make changes to use gmail?
Yes,the smpt credential
@@TechTutorialCN ypu have explained about in the video.So I've already changed that in my code.
Bro it stuck in..userverify...nothing showing..
Please help me with this..
@@manikandant2533 stuck in where?
@@TechTutorialCN bro after entering user name and user email..bro...i clicked register and then only it stuck bro..just a white page...help me with this bro..
@@manikandant2533 please check your form action and the ide console whats's the error code.
@@TechTutorialCN ok bro..thanks..for ur reply..🥰
Help me, please. I do myself like the way you do but it fails to send email. Then i take your source code, it fails to send email too (but in video your code is still active). How can i do to solve this problem ?
What error you are getting?
@@TechTutorialCN It is about the gmail, but i fixed it. Thank you for the video
Mình cũng đang gặp vấn đề không gửi đc email. B có thể chỉ mình cách bạn đã khắc phục được k?
@@hnhschannel2116 b kéo xuống bên cmt dưới có người chỉ lỗi 535 hay gì gì đó mà sửa mail thành gmail ấy. Vẫn chưa được nữa thì do gg nó không cho bật cái less secure app access, nên ko gửi được. Mình phải dùng mail edu thì mới gửi đc mail đi.
Mình cũng bị giống bạn, bạn đã làm được chưa ? có thể giúp mình được hk ?
I Got this error : javax.mail.AuthenticationFailedException: 535 Authentication credentials invalid
Maybe you are using wrong user email or password
@@TechTutorialCN both of them are correct
Are you using Gmail?
@@TechTutorialCN Yes
For security reason goggle refused to authenticate.
Good! But it send 2 verification code in the same time, can u help fix it!
I think you used the code two times in your message area.
amazing video thank you so much!
but i got this error : javax.mail.AuthenticationFailedException: 535 Authentication credentials invalid
i'm sure that my username and password were correct (Less Secure App is ON )
i even tried to use other email services
Because of google security
Hi sir,
Do you know what issue is this?
type Exception report
messageInternal Server Error
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.SecurityException: Access to default session denied
i had tried a lot of solution but it doesn't worked. (Email address and password is correct, and jar is import, and im using app password)
Hi, Could you pealse check out this solution: stackoverflow.com/questions/11566772/java-mail-api-exception-thrown-saying-java-lang-securityexception-access-to-d
@@TechTutorialCN It becomes another error
java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLExtension
It solved. Thank you
@@eeewwweehow do you solve this problems
@@shobhaborate1980 I forgot sorry lol
error : unable to send mail how to solve
What’s error has been caught?
Getinstance showing error!
What’s error is showing?
I think it's a warning in my console that showing like this "Email verification doesn't match with property"
I get SMTP not run error what should I do 😑
whats error you are getting?
@@TechTutorialCN javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
@@deepakkumars8139 are you using oracle openjdk on linux?
No I'm using eclipse and MySQL for database
I mean which operating system u are using and java version?
me puedes ayudar por favor
please give me file
activation-jaf1.1.1.jar
You may search I google can found in maven repo also
javax.mail.AuthenticationFailedException: 535 Authentication credentials invalid
you may use gmail app-password instead of using your original password.
@@TechTutorialCN @TechTutorial Hi there, I used mail.com like you did in the tutorial. Not gmail ?
Please double check the password and port