• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Design Issue(Urgent)

 
Ranch Hand
Posts: 469
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have five pages where user enter data in this five different page. Finally last page(fifth page) user will click on save, all data of five pages must be save to permnant database.
I am thinking when user jump between pages & enter the data, those data I can store in session temprary and finally on last page, when user click on Save button, I can get all data from session object & put in permanent database.
Now question is to store & get data in session should I user jsp or servlet??? Why?
Thanks,
Angela
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would choose to go with the servlet. Because you may be talking about developing a lot of business logic i.e. data access, form validation, error handling, redirection etc. To me adding this type of detail in a JSP can cause a JSP page to become unmaintainable. If you are not going to use the JSP page to display content, I would go with the servlet.
My $0.02
Craig.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Near the middle of this page is a list of places you can keep data while navigating pages. I'm certain it is not complete, and I may have made up #5. I can probably fabricate requirements to lead to any of the 8. You'll want to work from your own requirements.
Re the JSP / Servlet question, I like using servlets (or maybe ONE servlet) to receive requests, call out to the model layer to process them, then transfer to a JSP to build the response. I think this is about universal nowadays. See the Struts architecture diagrams.
[ April 10, 2003: Message edited by: Stan James ]
 
Angela D'souza
Ranch Hand
Posts: 469
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks,
Angela
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had a similar type of scenario. So I created an intermediate jsp file which will store various values. On submitting each page, this intermediate jsp page is called & the values are stored in variables. Now when Save is clicked on the last page all the data in the variables are stored in the database.
reply
    Bookmark Topic Watch Topic
  • New Topic