* Process the annotations for the servlets.
*/
protected static void loadApplicationServletAnnotations(Context context) {
ClassLoader classLoader = context.getLoader().getClassLoader();
StandardWrapper wrapper = null;
Class<?> classClass = null;
Container[] children = context.findChildren();
for (int i = 0; i < children.length; i++) {
if (children[i] instanceof StandardWrapper) {
wrapper = (StandardWrapper) children[i];
if (wrapper.getServletClass() == null) {
continue;
}
try {
classClass = classLoader.loadClass(wrapper.getServletClass());
} catch (ClassNotFoundException e) {
// We do nothing
} catch (NoClassDefFoundError e) {
// We do nothing
}
if (classClass == null) {
continue;
}
loadClassAnnotation(context, wrapper.getServletClass());
// Multipart configuration annotation
if (classClass.isAnnotationPresent(MultipartConfig.class)) {
MultipartConfig annotation =
(MultipartConfig) classClass.getAnnotation(MultipartConfig.class);
Multipart multipartConfig = new Multipart();
multipartConfig.setLocation(annotation.location());
multipartConfig.setMaxRequestSize(annotation.maxRequestSize());
multipartConfig.setMaxFileSize(annotation.maxFileSize());
multipartConfig.setFileSizeThreshold(annotation.fileSizeThreshold());
wrapper.setMultipartConfig(multipartConfig);
}
// Process JSR 250 access control annotations
// Process PermitAll, TransportProtected and RolesAllowed on the class
/*