Handling  Client  Request  Form  Data
Upcoming SlideShare
Loading in...5
×
 

Handling Client Request Form Data

on

  • 1,400 views

 

Statistics

Views

Total Views
1,400
Views on SlideShare
1,398
Embed Views
2

Actions

Likes
0
Downloads
6
Comments
0

1 Embed 2

http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Handling  Client  Request  Form  Data Handling Client Request Form Data Presentation Transcript

  • Handling Client Request Form Data
    • The Role of Form Data
    • If you have ever used the search engine visited an online books store tracked stocks on the Web or asked a Web- based websites for quotes on the tickets, you have probably seen funny looking. URLs like http://host/path?user=Marty+Hal&origin=bwi&dest=sfo . The part after the ? Is known as form data (or query data) and is most common way to get the information from the web page to a server side program. Form data can be attached to the end of URL after the question mark for GET request, form data can be sent to the server on different line for PoST request. Here are the basics:
    • 1) Use the Form element to create the HTML form . Use the ACTION attribute to designate the address of the servlet that will process the results; you can use abosulate or relative URL For:
    • <FORM ACTION=“……”></FORM>
    • Use input element to collect user data.Place the elements between the start and end tags of the form element given each input element a name .Textboxes are most common input parameter created with the following:
    • < INPUT TYPE =‘TEXT’ NAME=“….”/>
    • Place the submit button near the bottom of the form: For example,
    • <input type=“SUBMIT”/>
    • When the button is pressed the URL designated by the form’s ACTION is invoked . With GET request a question mark and the name value paurs are attached to the end of the URL where the name comes from nmae attribute in the HTML input elements and the values come from the end user.
    • Reading Form Data From The Servlet
    • One of the nice feature of the servlet that all of the form parsing handled automatically.You call the request.getParameter to get the value of Form parameter.
    • You can call request.getParametValues() if the parameter appears more than once.
    • Hierchy Of Your Project