In this lab, you will take the assignment you did in Tuesday's lab, and improve the validation. You are now required to deal with the possibility that the environment variables will have more than one value. (You may find the servlet method getParameterValues() useful.) You are also now required to deal with the possibility of HTML injection. I recommend writing your own version of PHP's htmlspecialchars()
. (In other words, write a function that takes a string and replaces every occurrence of <
with <
, >
with >
, and &
with &
)
This assignment is due Monday, July 28th before class.
When you've created the web app, log on to the class OnCourse page, go to the Assignments tab, and submit your assignment there. Remember to include the URL for your web app (including the port number) with your submission! Or you can get it checked off by one of the AI's during lab.