Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Code for generating new password:

<%Random r = new Random();   
StringBuilder sb = new StringBuilder();   
for (int i = 0; i < 8; ++i) {   
	char temp = (char) ('a' + r.nextInt('Z'- 'A'));
    sb.append(temp);
}  
String output = sb.toString();
out.println(sb.toString()); %>




Jsp tag to send a mail:

UserName* <input type="text" name="Name" value="" />
<input type="button" value="Proceed"  önclick="parent.location='mailto:abc@gmail.com';" />
<input type="submit" value="Reset">
Posted
Updated 19-May-13 20:04pm
v2

1 solution

The above tag would give you a mail to link. I guess thats not you want.
To send a mail with your generated password to an intended user, you might want
to use Java mail api.

Please refer here and see if its helpful.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900