|
HTML forms : HTML forms or java applets?
In the previous chapters we’ve taken a look at the basics of servlet writing; now it’s time to put these basics to use and develop a "real world" example. This chapter is devoted to HTML forms which are used to gather data from the user in many interactive web applications.
|
|
HTML forms : HTML forms or java applets?
In the previous chapters we’ve taken a look at the basics of servlet writing; now it’s time to put these basics to use and develop a "real world" example. This chapter is devoted to HTML forms which are used to gather data from the user in many interactive web applications.
|
|
You do not want any HTML in a servlet
Monday was the first day of the second annual O'Reilly Conference on Enterprise Java. I'm filling in for Bob Eckstein, who had a string of bad luck, including a long wait in the Phoenix airport, a flying piece of metal that got stuck in his eye, and a speaker who couldn't get to the show. (Bob -- with that piece of metal in his eye -- covered for the speaker.)
|
|
Handling Form Data
If you've ever used a Web search engine, visited an on-line bookstore, tracked stocks on-line, or asked a Web-based site for quotes on plane tickets, you've probably seen funny looking URLs like http://host/path?user=Marty+Hall&origin=bwi&dest=lax. The part after the question mark (i.e. user=Marty+Hall&origin=bwi&dest=lax) is known as form data, and is the most common way to get data from a Web page to a server-side program. It can be attached to the end of the URL after a question mark (as above), for GET requests, or sent to the server on a separate line, for POST requests.
|
|
Core Servlets and Java Server Pages Chapter 16: Using HTML Forms
All code is freely available for unrestricted use.
|