This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
People here are happy to help someone out. Often that help is a matter of pointing the person in the right direction. What Javaranch is not, is an answer mill. Using the ranch to get your homework done for you is strongly dicouraged..
I would start by doing some searches on the J2EE API (link in my signature) for HttpSecureServlet, enocdeURL, and encodeResponse. If any of these methods don't exist in the spec, then you can pretty much write off any answers that contain them.
The other document that you should always have at your fingertips is the Servlet Spec itself (link is also in my signature).