• 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

Help with buttons on a JSP page

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a HTML page , that has certain text fields.... on entering values into the text fields, it is directed to a servlet.

The servlet(puts the values into the database) then directs to a jsp with the values entered in the form.

I would like to know whether on the jsp page i can have 2 buttons like "edit" and "OK".
(how do I code it???)

The "edit" button edits the information on the initial HTML page and

The "OK" button just confirms the inputted information.

I hope I have asked a clear question.It would be great if someone directs me in the right direction.

Thanking everyone in advance

AS
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds pretty typical.

  • The user clicks a link and is forwarded to the form page.
  • When done filling out the form, the user clicks the "Save" button.
  • The servlet redirects to a confirmation page that has all the values stored in hidden form fields but also in a pretty, readable form.
  • If the user clicks 'OK' the form submits and the servlet writes the information and forwards to an 'Thank you' page.
  • If the user clicks the 'Edit' Button the servlet forwards back to the original form for the user to make the needed corrections.


  • What part are you stuck on?
     
    nash avin
    Ranch Hand
    Posts: 45
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi,

    Thanks a lot for the information.

    I would like to know the following details

    1) I would like to know how the "OK" and "Submit" buttons are generated on the jsp page.

    2) Following which , If the user clicks the OK button on the JSP the "form submits" the servlet writes the info. & forwards to a "Thank you" page. How can this be done...???

    3) If the user clicks Edit button the servlet forwards back to the original html form for the user to make the needed corrections.

    It would be great if a detailed description can be given..

    Thanks a lot for your time and help

    AS
     
    Ben Souther
    Sheriff
    Posts: 13411
    Firefox Browser VI Editor Redhat
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I'm guessing by your questions that you are new to both JSP/Servlets and to HTML and web programming.

    If this is the case, you'll be much better off if you step back a bit and find some good books and tutorials to follow.

    One book that I would strongly recommend is "Core Servlets and Java Server Pages"; available for free download at http://pdf.coreservlets.com.
    I think this one would be good because it devotes a chapter just to HTML forms and how they work (for any web programming language).

    The time you set aside upfront to learn the basics will more than pay off when you go back to your project.

    -Ben
     
    nash avin
    Ranch Hand
    Posts: 45
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi,

    Thanks again for your time and consideration.Will read the book as you have suggested.

    AS
     
    reply
      Bookmark Topic Watch Topic
    • New Topic