Debugging Servlets
Use print statements; run server on desktop
Integrated debugger in IDE
Look at the HTML source
Return error pages to the client
Plan ahead for missing/malformed data
Use the log file
log("message") or log("message", Throwable)
Look at the request data separately
See EchoServer at archive.corewebprogramming.com
Look at the response data separately
See WebClient at archive.corewebprogramming.com
Stop and restart the server
25
Servlets
www.corewebprogramming.com
core
Web
programming
Handling the Client Request:
Form Data
26
2001 2003 Marty Hall, Larry Brown http://www.corewebprogramming.com
13