O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Q&A

Q1: What are the two main HTTP methods used to send requests to a Web server? What is the main difference between them? Which should I use to send sensitive information to the server?
A1: The two main methods are GET and POST. GET adds any request parameters to the URL query string, whereas POST sends its parameters as part of the request body. It is for this reason that you should use POST to send sensitive information.
Q2:What are the main uses for a ServletContext object?
A2: The main uses are to set and store attributes, log events, obtain URL references to resources, and get the MIME type of files.
Q3:What are the names of the methods I must implement to handle HTTP GET and POST requests?
A3: The methods are doGet() and doPost().
Q4:What ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required