This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

best way to collect data and put it in db

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
I am working in a "questionair" which is a many steps wizard
I need to collect all the data
then make a confirmation page
then put them in a mySql db

with my normal way ( getParameter() for each one) it will be difficult .

also which session way i can use

Thanks very much
 
hesham katon
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
i think the best way to do this using "Front Controller" design pattern

can any one help me with examples of Front Object Examples using in simple wizard like this

specially jsp front objects

thanks in advance
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use Struts and a session-scoped form bean. As a user goes through the screens, the form bean is filled with data. Then at the end, you pass the data to the business tier for persistence.

- alan
 
author & internet detective
Posts: 39789
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to servlets since the question is more about collecting data than putting in database.
 
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adopting Struts just for this one purpose is a bit heavy-handed. It's easy enough to maintain multi-page form data with simple Java classes.
 
hesham katon
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much

yes Struts will be hard , since i already don't use it , i can't learn it to do this task

Dear Bear,
do you mean normal class , or a JavaBean which store all the fields in it ?

i think it will be good and simple way
what do you think

thank you all
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can do it with session.
and about bean that would be just your VO. set the some properties of your bean in first request. then set your bean in session as attribute and then get the bean from session set the remaining properties and so on. on completion just do whatever you want to do with your bean.

you can also go for URL re-writing i think.
 
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
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!