March 2008
Intermediate to advanced
911 pages
20h 31m
English

Here’s what Kim does not want in his servlet:
PrintWriter out = response.getWriter();
out.println("blooper@wickedlysmart.com");Hard-coding the address is BAD!
What happens when his email changes? He’ll have to recompile...
He’d much rather put his email address in the Deployment Descriptor (web.xml file) so that when he deploys his web app, his servlet can somehow “read” his email address from the DD. That way, he won’t have to hard-code his address in the servlet class, and to change his email he modifies only the web.xml file, without having to touch his servlet source code.