java web log on to achieve SMS verification code examples
Operating Environment
jdk7+tomcat7
Project Technical (required)
Servlet+Ajax+Bootstrap
Database files
I am here useless to the database is relatively simple, if you do not need to use the database, then you can private letter to me or add me QQ
jar package file
Only one jar package in the lib folder under the project file
Run shot
project description
This small case of it you can install a small force in a project, I was born in school, anyway, when the project reply, see everyone's reaction is not bad, ha ha.
In this case we can not only use it when logging in, the other time of registration can also be used, all of you to decide, anyway, I spent at the time of registration, this is not the case for everyone to knock registered, simply log in to write a to share with you. Did not use any framework, with a simple Servlet, very easy to understand, I downloaded code, simply change a few lines of code, and change your own code to OK!
1, you need to log in seconds tick Technology (www.miaodiyun.com) the official website to register an account, this is after I have registered is like this, you need to do is get your own information inside the developer AUTH_TOKEN
2, need to create a template configuration management, this template is a template to send verification code, for everyone to look at my template
3. Then I downloaded the code after the import tools, in java.aaa.util this package GetMessageCode class, I circled the place into your own, I believe we should be able to understand, not elaborate, the place changed my lap on the line (ACCOUNT_SID and AUTH_TOKEN) it is best to change these two just fine; below that is going inside your template corresponding to the above said, you need to own Create a new template, and trapping that is consistent with your template below me, remember, it must be consistent
4. After everything is ready, deploy the project, the project started, login address is:
Page is shown below:
An error code page :( I received a verification code is 919805, I type, is 919,804, it will prompt an error, of course, to jump successfully enter the correct page)
Finally, I forgot to tell you is that, this website will be presented after registering 10 dollars, enough to them to learn to use, so do not worry about the need to charge money, rest assured.
Finishing is not easy, when just begun to explore a variety of experience BUG, once wanted to give up, but eventually persevered, but also can think of to share with you, hope you will enjoy it.