multi-step user registration ?
Hi all, How can I handle multiple forms or multi-step user registration (multi step form) with Struts ? I want to create 4 forms and it should show the data of all the forms when user click on the Submit button on the last form . Please give me the idea...how to do that? Please send me the code if anyone has one Thanks in advance Harish Pathak - Yahoo! Photos Showcase holiday pictures in hardcover Photo Books. You design it and well bind it!
Re: multi-step user registration ?
On 1/17/06, Harish Pathak [EMAIL PROTECTED] wrote: Hi all, How can I handle multiple forms or multi-step user registration (multi step form) with Struts ? I want to create 4 forms and it should show the data of all the forms when user click on the Submit button on the last form . Please give me the idea...how to do that? Please send me the code if anyone has one Thanks in advance Harish Pathak Something like this (live demo): http://www.superinterface.com/strutsdialog/wizardaction.do See the Wizard Action page: http://struts.sourceforge.net/strutsdialogs/wizardaction.html The project page: http://struts.sourceforge.net/strutsdialogs/ It is a little convoluted, but bulletproof. Your action form must retain state between requests, that is, must have session scope. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multi-step user registration ?
Harish, How about Struts Flow? I haven't used it but I have seen a post or two about it so I thought you might want to know about it. http://struts.apache.org/struts-flow/index.html Regards, David -Original Message- From: Michael Jouravlev [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 17, 2006 12:23 PM To: Struts Users Mailing List Subject: Re: multi-step user registration ? On 1/17/06, Harish Pathak [EMAIL PROTECTED] wrote: Hi all, How can I handle multiple forms or multi-step user registration (multi step form) with Struts ? I want to create 4 forms and it should show the data of all the forms when user click on the Submit button on the last form . Please give me the idea...how to do that? Please send me the code if anyone has one Thanks in advance Harish Pathak Something like this (live demo): http://www.superinterface.com/strutsdialog/wizardaction.do See the Wizard Action page: http://struts.sourceforge.net/strutsdialogs/wizardaction.html The project page: http://struts.sourceforge.net/strutsdialogs/ It is a little convoluted, but bulletproof. Your action form must retain state between requests, that is, must have session scope. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
User Registration
Hi I have a link in my application for user registration form . It has combo box in the form that need to be populated from database. Say : Form action path is register.do and form name is register_form What should be the link and how we have to do mapping in struts-config.xml Regards Vijay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
User Registration
Hi I have a link in my application for user registration form . It has combo box in the form that need to be populated from database. Say : Form action path is register.do and form name is register_form What should be the link and how we have to do mapping in struts-config.xml Regards Vijay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help on Action implementing thread for checking user registration thru email?
-Original Message- From: struts Dude [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 9:14 PM To: Struts Users Mailing List Subject: Help on Action implementing thread for checking user registration thru email? Hi, I am going to write an app that allow user to register in a JSP page, press submit, then user redirected to a new page telling user to check email, click on a link on email, redirected to a page, then commit user info to database. If user doesn't do this within 24 hrs, then delete user info. I have no problem sending email with a unique link made up of unique username plus some random generated digits and characters. I was wandering if anyone has done this and give me some tips. The way I see it is commit user's registration detail to database 1st when user click submit, then send email (using jarkata mailer tag). Then delete user record if user don't click/visit link on dynamically generated link within 24 hr from email. The link would have parameter that can tell an Action who is visiting. Problem: Now, how do I write an Action that will check back latter after 24 Hrs for an user?? Using thread in Action??? Dunno if that's a good idea. The way I am going to do this is, have an Action implement thread, for evey user registration, set wake up (check back) interval after 24 hr. Every user visiting this Action will wake up Action and do validation. After that, Action goes back to sleep. Is this a good idea?? Let's see... how many users on your website signing up for mail? Which is going to leave how many threads hanging around in a 24 hour period? Yuck. Yuck. What you are really looking for is outside of struts, since struts is only an MVC framework, not an application framework. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help on Action implementing thread for checking user registration thru email?
This might help: http://www.quartzscheduler.org/ It is not strictly for struts, but it is a solution for what you want to do. Pritpal Dhaliwal -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 9:16 AM To: Struts Users Mailing List Subject: RE: Help on Action implementing thread for checking user registration thru email? -Original Message- From: struts Dude [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 9:14 PM To: Struts Users Mailing List Subject: Help on Action implementing thread for checking user registration thru email? Hi, I am going to write an app that allow user to register in a JSP page, press submit, then user redirected to a new page telling user to check email, click on a link on email, redirected to a page, then commit user info to database. If user doesn't do this within 24 hrs, then delete user info. I have no problem sending email with a unique link made up of unique username plus some random generated digits and characters. I was wandering if anyone has done this and give me some tips. The way I see it is commit user's registration detail to database 1st when user click submit, then send email (using jarkata mailer tag). Then delete user record if user don't click/visit link on dynamically generated link within 24 hr from email. The link would have parameter that can tell an Action who is visiting. Problem: Now, how do I write an Action that will check back latter after 24 Hrs for an user?? Using thread in Action??? Dunno if that's a good idea. The way I am going to do this is, have an Action implement thread, for evey user registration, set wake up (check back) interval after 24 hr. Every user visiting this Action will wake up Action and do validation. After that, Action goes back to sleep. Is this a good idea?? Let's see... how many users on your website signing up for mail? Which is going to leave how many threads hanging around in a 24 hour period? Yuck. Yuck. What you are really looking for is outside of struts, since struts is only an MVC framework, not an application framework. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help on Action implementing thread for checking user registration thru email?
You probably only need a javax.management.timer.Timer -- a single Thread that runs forever, invoking an event listener every so often. The Timer can be initialized and started by a ServletContext listener at application startup. The event listener queries the database, looking for new registrants. It checks to see if 24 hours have elapsed since they registered . . . etc. Erik Dhaliwal, Pritpal (HQP) wrote: This might help: http://www.quartzscheduler.org/ It is not strictly for struts, but it is a solution for what you want to do. Pritpal Dhaliwal -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 9:16 AM To: Struts Users Mailing List Subject: RE: Help on Action implementing thread for checking user registration thru email? -Original Message- From: struts Dude [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 9:14 PM To: Struts Users Mailing List Subject: Help on Action implementing thread for checking user registration thru email? Hi, I am going to write an app that allow user to register in a JSP page, press submit, then user redirected to a new page telling user to check email, click on a link on email, redirected to a page, then commit user info to database. If user doesn't do this within 24 hrs, then delete user info. I have no problem sending email with a unique link made up of unique username plus some random generated digits and characters. I was wandering if anyone has done this and give me some tips. The way I see it is commit user's registration detail to database 1st when user click submit, then send email (using jarkata mailer tag). Then delete user record if user don't click/visit link on dynamically generated link within 24 hr from email. The link would have parameter that can tell an Action who is visiting. Problem: Now, how do I write an Action that will check back latter after 24 Hrs for an user?? Using thread in Action??? Dunno if that's a good idea. The way I am going to do this is, have an Action implement thread, for evey user registration, set wake up (check back) interval after 24 hr. Every user visiting this Action will wake up Action and do validation. After that, Action goes back to sleep. Is this a good idea?? Let's see... how many users on your website signing up for mail? Which is going to leave how many threads hanging around in a 24 hour period? Yuck. Yuck. What you are really looking for is outside of struts, since struts is only an MVC framework, not an application framework. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help on Action implementing thread for checking user registration thru email?
I previously posted a message on how i did this as a struts plugin, so i've reposted below. To do what you require, instead of scheduling a job for each entry after 24hrs, i would include a timestamp in the database, then say every hour, check for expired entries and delete them. Nope, you dont need to start another process - i use a struts plugin to load and initialise Quartz. It will run in other threads, but this will all be done for you behind the scenes. The code for my struts plugin is below (if it's of any help). Add the following entry to the struts-config-default.xml in the plug-in section to load it: plug-in className=com.netcase.pdp.service.SchedulerService/plug-in It runs a Job every 30 mins. This job takes the form: public class RemoveOldProvisionalTrainingJob implements StatefulJob { public void execute(JobExecutionContext arg0) throws JobExecutionException { // code to do actual work here } } Note that i'm implementing StatfulJob - this stops it running two of the same job at the same time. Daniel. -SchedulerService.java- package com.netcase.pdp.service; import java.util.Date; import javax.servlet.ServletException; import org.apache.struts.action.ActionServlet; import org.apache.struts.action.PlugIn; import org.apache.struts.config.ModuleConfig; import org.quartz.JobDetail; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.SchedulerFactory; import org.quartz.SimpleTrigger; import com.netcase.pdp.service.scheduledjobs.RemoveOldProvisionalTrainingJob; /** * @author Daniel Perry * */ public class SchedulerService implements PlugIn { Scheduler sched; public void init(ActionServlet servlet, ModuleConfig moduleConf) throws ServletException { System.out.println(Starting scheduler service...); SchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory(); try { sched = schedFact.getScheduler(); sched.start(); JobDetail jobDetail = new JobDetail( removeOldProvisionalTrainingJob, Scheduler.DEFAULT_GROUP, RemoveOldProvisionalTrainingJob.class); // new trigger - repeat every 30 mins starting in 5 mins time // (delay for startup) SimpleTrigger trigger = new SimpleTrigger(30MinTrigger, Scheduler.DEFAULT_GROUP, new Date(new Date().getTime() + (5L* 60L * 1000L)), null, SimpleTrigger.REPEAT_INDEFINITELY, 30 * 60L * 1000L); sched.scheduleJob(jobDetail, trigger); } catch (SchedulerException ex) { ex.printStackTrace(); } } public void destroy() { try { sched.shutdown(); } catch (SchedulerException ex) { ex.printStackTrace(); } sched = null; } } --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help on Action implementing thread for checking user registration thru email?
All this sounds very complex, what's wrong with encoding the time in the url (securely) and testing it when you perform the action? Alternatively store the request time and id on the server. Paul Global Equity Derivatives Technology Deutsche Bank [/] Office +44 (0)20 754 55458 Mobile +44 (0)7736 299483 Fax +44 (0)20 7547 2752 -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 19 August 2004 18:15 To: Struts Users Mailing List Subject: RE: Help on Action implementing thread for checking user registration thru email? I previously posted a message on how i did this as a struts plugin, so i've reposted below. To do what you require, instead of scheduling a job for each entry after 24hrs, i would include a timestamp in the database, then say every hour, check for expired entries and delete them. Nope, you dont need to start another process - i use a struts plugin to load and initialise Quartz. It will run in other threads, but this will all be done for you behind the scenes. The code for my struts plugin is below (if it's of any help). Add the following entry to the struts-config-default.xml in the plug-in section to load it: plug-in className=com.netcase.pdp.service.SchedulerService/plug-in It runs a Job every 30 mins. This job takes the form: public class RemoveOldProvisionalTrainingJob implements StatefulJob { public void execute(JobExecutionContext arg0) throws JobExecutionException { // code to do actual work here } } Note that i'm implementing StatfulJob - this stops it running two of the same job at the same time. Daniel. -SchedulerService.java- package com.netcase.pdp.service; import java.util.Date; import javax.servlet.ServletException; import org.apache.struts.action.ActionServlet; import org.apache.struts.action.PlugIn; import org.apache.struts.config.ModuleConfig; import org.quartz.JobDetail; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.SchedulerFactory; import org.quartz.SimpleTrigger; import com.netcase.pdp.service.scheduledjobs.RemoveOldProvisionalTrainingJob; /** * @author Daniel Perry * */ public class SchedulerService implements PlugIn { Scheduler sched; public void init(ActionServlet servlet, ModuleConfig moduleConf) throws ServletException { System.out.println(Starting scheduler service...); SchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory(); try { sched = schedFact.getScheduler(); sched.start(); JobDetail jobDetail = new JobDetail( removeOldProvisionalTrainingJob, Scheduler.DEFAULT_GROUP, RemoveOldProvisionalTrainingJob.class); // new trigger - repeat every 30 mins starting in 5 mins time // (delay for startup) SimpleTrigger trigger = new SimpleTrigger(30MinTrigger, Scheduler.DEFAULT_GROUP, new Date(new Date().getTime() + (5L* 60L * 1000L)), null, SimpleTrigger.REPEAT_INDEFINITELY, 30 * 60L * 1000L); sched.scheduleJob(jobDetail, trigger); } catch (SchedulerException ex) { ex.printStackTrace(); } } public void destroy() { try { sched.shutdown(); } catch (SchedulerException ex) { ex.printStackTrace(); } sched = null; } } --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] R - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help on Action implementing thread for checking user registration thru email?
I second the below - when you pull the user info from the database check the timestamp and in it's greater then 24hrs, delete it and kick the user out... then you can just cleanup the database daily, weekly, etc at off peak times... this way nothing is dependent on a job running... Mike -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 10:15 AM To: Struts Users Mailing List Subject: RE: Help on Action implementing thread for checking user registration thru email? To do what you require, instead of scheduling a job for each entry after 24hrs, i would include a timestamp in the database, then say every hour, check for expired entries and delete them. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help on Action implementing thread for checking user registration thru email?
I think the issue here is that user will never return. So struts dude needs some kind of mechanism to check every so often to see if the user has not returned in 24 hours. If the user has not came back, he wants to delete that record. So some timer mechanism is needed. His options.. Use resin application server and use the run-at attribute for a servlet. You can schedule it to run every hour or 30 mins or whatever. Or use JDK's Timer or Quartz from open symphony. Or JMS.. I think quartz makes sense over here. My dos cientos (again) Pritpal -Original Message- From: Michael Finger [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 10:29 AM To: Struts Users Mailing List Subject: RE: Help on Action implementing thread for checking user registration thru email? I second the below - when you pull the user info from the database check the timestamp and in it's greater then 24hrs, delete it and kick the user out... then you can just cleanup the database daily, weekly, etc at off peak times... this way nothing is dependent on a job running... Mike -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 10:15 AM To: Struts Users Mailing List Subject: RE: Help on Action implementing thread for checking user registration thru email? To do what you require, instead of scheduling a job for each entry after 24hrs, i would include a timestamp in the database, then say every hour, check for expired entries and delete them. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help on Action implementing thread for checking user registration thru email?
Wow, u guys r super. So many help. I will go with Daniel's solution. To maximize portability, I think the best solution is not to depend on DB timestamp to delete it as different DB will have different ways of doing it, hence learning new things if change new DB. Thanks guys. :D - Original Message - From: Daniel Perry [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 20, 2004 5:15 AM Subject: RE: Help on Action implementing thread for checking user registration thru email? I previously posted a message on how i did this as a struts plugin, so i've reposted below. To do what you require, instead of scheduling a job for each entry after 24hrs, i would include a timestamp in the database, then say every hour, check for expired entries and delete them. Nope, you dont need to start another process - i use a struts plugin to load and initialise Quartz. It will run in other threads, but this will all be done for you behind the scenes. The code for my struts plugin is below (if it's of any help). Add the following entry to the struts-config-default.xml in the plug-in section to load it: plug-in className=com.netcase.pdp.service.SchedulerService/plug-in It runs a Job every 30 mins. This job takes the form: public class RemoveOldProvisionalTrainingJob implements StatefulJob { public void execute(JobExecutionContext arg0) throws JobExecutionException { // code to do actual work here } } Note that i'm implementing StatfulJob - this stops it running two of the same job at the same time. Daniel. -SchedulerService.java- package com.netcase.pdp.service; import java.util.Date; import javax.servlet.ServletException; import org.apache.struts.action.ActionServlet; import org.apache.struts.action.PlugIn; import org.apache.struts.config.ModuleConfig; import org.quartz.JobDetail; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.SchedulerFactory; import org.quartz.SimpleTrigger; import com.netcase.pdp.service.scheduledjobs.RemoveOldProvisionalTrainingJob; /** * @author Daniel Perry * */ public class SchedulerService implements PlugIn { Scheduler sched; public void init(ActionServlet servlet, ModuleConfig moduleConf) throws ServletException { System.out.println(Starting scheduler service...); SchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory(); try { sched = schedFact.getScheduler(); sched.start(); JobDetail jobDetail = new JobDetail( removeOldProvisionalTrainingJob, Scheduler.DEFAULT_GROUP, RemoveOldProvisionalTrainingJob.class); // new trigger - repeat every 30 mins starting in 5 mins time // (delay for startup) SimpleTrigger trigger = new SimpleTrigger(30MinTrigger, Scheduler.DEFAULT_GROUP, new Date(new Date().getTime() + (5L* 60L * 1000L)), null, SimpleTrigger.REPEAT_INDEFINITELY, 30 * 60L * 1000L); sched.scheduleJob(jobDetail, trigger); } catch (SchedulerException ex) { ex.printStackTrace(); } } public void destroy() { try { sched.shutdown(); } catch (SchedulerException ex) { ex.printStackTrace(); } sched = null; } } --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help on Action implementing thread for checking user registration thru email?
Hi, I am going to write an app that allow user to register in a JSP page, press submit, then user redirected to a new page telling user to check email, click on a link on email, redirected to a page, then commit user info to database. If user doesn't do this within 24 hrs, then delete user info. I have no problem sending email with a unique link made up of unique username plus some random generated digits and characters. I was wandering if anyone has done this and give me some tips. The way I see it is commit user's registration detail to database 1st when user click submit, then send email (using jarkata mailer tag). Then delete user record if user don't click/visit link on dynamically generated link within 24 hr from email. The link would have parameter that can tell an Action who is visiting. Problem: Now, how do I write an Action that will check back latter after 24 Hrs for an user?? Using thread in Action??? Dunno if that's a good idea. The way I am going to do this is, have an Action implement thread, for evey user registration, set wake up (check back) interval after 24 hr. Every user visiting this Action will wake up Action and do validation. After that, Action goes back to sleep. Is this a good idea?? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help on Action implementing thread for checking user registration thru email?
Hello struts, Thursday, August 19, 2004, 7:13:33 AM, you wrote: sD Hi, sD I am going to write an app that allow user to register in a JSP page, sD press submit, then user redirected to a new page telling user sD to check email, click on a link on email, redirected to a page, sD then commit user info to database. If user doesn't do this sD within 24 hrs, then delete user info. sD I have no problem sending email with a unique link made up sD of unique username plus some random generated digits and characters. sD I was wandering if anyone has done this and give me some tips. sD The way I see it is commit user's registration detail to database 1st sD when user click submit, then send email (using jarkata mailer tag). sD Then delete user record if user don't click/visit link on dynamically sD generated link within 24 hr from email. The link would have parameter sD that can tell an Action who is visiting. sD Problem: sD Now, how do I write an Action that will check back latter after 24 Hrs sD for an user?? Using thread in Action??? Dunno if that's a good idea. sD The way I am going to do this is, have an Action implement sD thread, for evey user registration, set wake up (check back) sD interval after 24 hr. Every user visiting this Action will wake sD up Action and do validation. After that, Action goes back to sleep. sD Is this a good idea?? What about following variant? In execute method of RegistrationAction: 1. Drop ALL expired records from database 2. Commit user info to DB sD - sD To unsubscribe, e-mail: [EMAIL PROTECTED] sD For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards, Pavlikusmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[2]: Help on Action implementing thread for checking user registration thru email?
Hello struts, Thursday, August 19, 2004, 7:36:38 AM, you wrote: sD - Original Message - sD From: Pavlikus [EMAIL PROTECTED] sD To: Struts Users Mailing List [EMAIL PROTECTED] sD Sent: Thursday, August 19, 2004 4:30 PM sD Subject: Re: Help on Action implementing thread for checking user sD registration thru email? What about following variant? In execute method of RegistrationAction: 1. Drop ALL expired records from database 2. Commit user info to DB -- Best regards, Pavlikusmailto:[EMAIL PROTECTED] sD Can you be a bit more specific? Do you mean to use DB to set expired time sD for each record to be 24 hr, if user not check back with Action, DB sD will drop that record automatically?? Yes. I store preRegistration date in DB. So, I can easy drop expired records during new user registration. sD - sD To unsubscribe, e-mail: [EMAIL PROTECTED] sD For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards, Pavlikusmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]