I want to construct a system which is responsible for updating my database columns.
It is similar to registration of memberships.We have users and they send a request form of the开发者_运维问答ir wishes.First of all , the system inserts all of these information in a table .One column specifies the state of the request.It contains the integer values which refers to some states.
In addition to this , (which I want to do ) When the user send the request form , the system has sent e-mail.I want to change the state according to e-mail which will contain the link with registration-key.When the user clicks the link , the specific column of user updates the information.
How can I do these flow with java.I have currently used the Spring framework and java enterprise edition.
Can anyone help me ?
If I got your question right you need to implement workflow like
1. User submits HTML-form with some data
2. System sends e-mail to user with link like http://example.com/JSRegistrationConfirmation?d=hn7arypmLs4m7CkKLu
3. User clicks the link and opens confirmation web-page
4. After confirmation page is opened system knows that user is registered.
It's not that clear what exactly is the problem for you. System creates some temporary record in database, after user submits the form. After user opens the link your system makes this record permanent by updating related row.
A link that user receives should contain his ID at least, so that system could define what user confirms his registration. When user clicks the URL from e-mail, dispatching servlet deployed on your servlet container calls some controller which is responsible for processing user confirmation requests, than this controller in its turn makes some calls to service method, service method invokes method of DAO object and finally DAO object updates table row.
I know I sound like Captain Obvious, but could you be more specific in your question? Do you use Spring MVC? What did you try to do to implement this workflow and where did you stuck?
精彩评论