* @param pathSpec The path spec for the servlet
* @param servletClass The servlet class
*/
public <T extends HttpServlet> void addServlet(String name, String pathSpec,
Class<T> servletClass) {
WebApplicationContext context = webAppContext;
try {
if (name == null) {
context.addServlet(pathSpec, servletClass.getName());
} else {
context.addServlet(name, pathSpec, servletClass.getName());
}
} catch (ClassNotFoundException ex) {
throw makeRuntimeException("Problem instantiating class", ex);
} catch (InstantiationException ex) {
throw makeRuntimeException("Problem instantiating class", ex);