• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Select and unselect in textarea

 
Master Rancher
Posts: 2249
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Gayathri Gayu wrote:So is now everything is in jsp and not in servlet? Do i need to modify the entire project code?  



Not at all.  Whatever code you have written in jsp scriptlet block the same stuff will go inside servlet.  

I am suggesting you to keep useid/password in a file and read from there because, if it changes e.g. password changed you don't have to make any change in the code, you will just change that file.
 
Ranch Foreman
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Means i have to create a text file store user id and password and read it from the file when sending mails. Am i correct?
 
Swastik Dey
Master Rancher
Posts: 2249
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes
 
Gayathri Gayu
Ranch Foreman
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. then I will try doing that way. If in case I have doubts i will ask you. Thanks again.
 
Swastik Dey
Master Rancher
Posts: 2249
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Always welcome.
 
Gayathri Gayu
Ranch Foreman
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can i able to send a link which expires in a day or hours on clicking forget password. The link should be used by the  user only once. How to do this? Please help me.
 
Swastik Dey
Master Rancher
Posts: 2249
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean if the user forgets password, you will send him/her as password reset link through email, and that will be valid for a specific period of time?
 
Gayathri Gayu
Ranch Foreman
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
 
Swastik Dey
Master Rancher
Posts: 2249
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There might be better ways.  But one approach could be, when you are emailing the link save the userid (to whom it's being sent) and the current timestamp.  When the reset request comes, compare the current time stamp with the that you have saved, if it exceeds the limit disallow.  Again, this is my thought, there might be better approaches.
 
Gayathri Gayu
Ranch Foreman
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure whether this is the right way to do or not. I browsed and got the following link ForgotPassword for sending email to the registered id. I don't know what should i add in the mailing part too. Please give me suggestions. Or should i write java code like i did for registration.
 
Gayathri Gayu
Ranch Foreman
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Swastik Dey wrote:There might be better ways.  But one approach could be, when you are emailing the link save the userid (to whom it's being sent) and the current timestamp.  When the reset request comes, compare the current time stamp with the that you have saved, if it exceeds the limit disallow.  Again, this is my thought, there might be better approaches.



Can you explain this little brief. I couldn't understand this. Please
 
Swastik Dey
Master Rancher
Posts: 2249
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I said when you are sending the link to user save that info in some underlying database table.  For e.g. email sent to user1 at 1 pm so we save this info as

user1 1000 (1000 is just an example it should be current time in millis for 1 PM)

Now say we would allow the link to be valid for one hour

We get a reset request from user1 at 3PM.  Now for user1 we have saved 1 PM when the mail was sent.  So the time diff between 3PM and 1PM is above 1 hour and we won't allow this.  

My thought is somewhat like this.
 
Get out of my mind! Look! A tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!