Lab 3-2 — HTTP Request
Instructions
-
Update your build.xml file for project 3 by uncommenting the project 3 property line:
-
Create a project3 directory in your java112 directory (similar to the project2 directory from last unit).
-
Create a servlet named Lab32Servlet and place it in the project3 directory.
Question
Think about what package statement this class should have.
-
Output the following to the browser from the
HttpServletRequest
object. Use an unordered list to display the values.- The current Locale of the request
- The Context Path of the request
- The Local Name of the server
- The Scheme used to make the request
Hint
The Javadoc for HttpServletRequest and its super interface will be helpful!
Screenshots
To receive credit for this lab save a screenshot in the projects/screenshots/week9
directory.
lab2-servlet.png
: The servlet running in the browser.
Add, commit, and push and verify all work, including screenshots are visible in GitHub.
Rubric
All of the following must be satisfied to achieve a "Met" status
- Screenshot clearly shows the servlet running in the browser.
- Code and screenshot are properly named and saved in the correct directory.
- All lab steps have been accurately and appropriately implemented.