• 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

How the value of field from jsp page to action in struts

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

can anyone tell me, how the value entered in text field of jsp page goes to action class in struts?
i mean, behind the screen, how is happening?

Regards,
Ganesan R
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts has a document on all the technologies it relies on here.  I'll give the high-level summary for a typical form submission:
First, the browser doesn't know it has a JSP page.  The JSP is interpreted by the server and regular old HTML is sent to the browser (use your browser's "view page source" function to see the result).  
Next, when you click "submit" on an HTML form, it makes an HTTP request, usually a GET or a POST, to the server.  The details of these requests are documented in the RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1, Section 9, but suffice to say they include the information on the form in the HTTP request to the server.  
Next, the servlet container maps the incoming request URL to a service it is running (i.e. a Struts application) and passes the request on.  Struts maps the URL to an Action, and populates it with the information contained in the request.  
Once your action class has run, Struts is used by the servlet container to build the response, usually by processing a JSP, which references the previously populated action (though there are other response types and processes).  
Finally, the response is then sent to the browser, which should display the results of your form submission.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic