Sen final year project.
// content before button
String firstMessage = "Verify yourself and be a member of vidico community.";
// value you want to show i.e click here or reset password or confirm
String buttonValue = "Confirm";
// link for button
String confirmationUrl = "http://localhost:8084/NewsAggregator/Controller?action=confirm&key=" + u.getId();
// content after button
String lastMessage = "If the link doesn't work please copy below link and paste it directly into your browser." + "<br> " + confirmationUrl;
MailService mailContent = new MailService(firstMessage, lastMessage, buttonValue, confirmationUrl);
boolean mailStatus = mailContent.sendMail(u.getEmail(), "Confirmatiom Mail");
MongoClient mongo = (MongoClient) request.getServletContext().getAttribute("MONGO_CLIENT");
SequenceDAO seqDao = new SequenceDAO(mongo);
// get sequence for COMMENT starting from 1
long n = seqDao.getNextSequenceId("COMMENT");
System.out.println(n);
Download these libraries and add it to project.
- jstl-1.2.jar - tag library
- java-mail-1.4.4.jar - for mailing purpose
- mongo-java-driver-3.3.0.jar - for mongodb connectivity
- clone repository
- import it
- clean build
- run
Free Software, Hell Yeah!