Examples of filterName()


Examples of javax.servlet.annotation.WebFilter.filterName()

    protected void processConfigAnnotations(Class<?> clazz) {

        if (clazz.isAnnotationPresent(WebFilter.class)) {
            WebFilter annotation = clazz.getAnnotation(WebFilter.class);
            // Add servlet filter
            String filterName = annotation.filterName();
            FilterDef filterDef = new FilterDef();
            filterDef.setFilterName(annotation.filterName());
            filterDef.setFilterClass(clazz.getName());
            WebInitParam[] params = annotation.initParams();
            for (int i = 0; i < params.length; i++) {
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.filterName()

        if (clazz.isAnnotationPresent(WebFilter.class)) {
            WebFilter annotation = clazz.getAnnotation(WebFilter.class);
            // Add servlet filter
            String filterName = annotation.filterName();
            FilterDef filterDef = new FilterDef();
            filterDef.setFilterName(annotation.filterName());
            filterDef.setFilterClass(clazz.getName());
            WebInitParam[] params = annotation.initParams();
            for (int i = 0; i < params.length; i++) {
                filterDef.addInitParameter(params[i].name(), params[i].value());
            }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.filterName()

        for (Class<?> cls : classes) {
            if (!Filter.class.isAssignableFrom(cls)) {
                throw new DeploymentException("The class " + cls.getName() + " with WebFilter annotation must implement javax.servlet.Filter");
            }
            WebFilter webFilter = cls.getAnnotation(WebFilter.class);
            String filterName = webFilter.filterName().length() == 0 ? cls.getName() : webFilter.filterName();
            boolean valueAttributeConfigured = webFilter.value().length > 0;
            boolean urlPatternsAttributeConfigured = webFilter.urlPatterns().length > 0;
            if (valueAttributeConfigured && urlPatternsAttributeConfigured) {
                throw new DeploymentException("value and urlPatterns must not be configured on the same WebFilter annotation in the class " + cls.getName());
            }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.filterName()

        for (Class<?> cls : classes) {
            if (!Filter.class.isAssignableFrom(cls)) {
                throw new DeploymentException("The class " + cls.getName() + " with WebFilter annotation must implement javax.servlet.Filter");
            }
            WebFilter webFilter = cls.getAnnotation(WebFilter.class);
            String filterName = webFilter.filterName().length() == 0 ? cls.getName() : webFilter.filterName();
            boolean valueAttributeConfigured = webFilter.value().length > 0;
            boolean urlPatternsAttributeConfigured = webFilter.urlPatterns().length > 0;
            if (valueAttributeConfigured && urlPatternsAttributeConfigured) {
                throw new DeploymentException("value and urlPatterns must not be configured on the same WebFilter annotation in the class " + cls.getName());
            }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.filterName()

        for (Class<?> cls : classes) {
            if (!Filter.class.isAssignableFrom(cls)) {
                throw new DeploymentException("The class " + cls.getName() + " with WebFilter annotation must implement javax.servlet.Filter");
            }
            WebFilter webFilter = cls.getAnnotation(WebFilter.class);
            String filterName = webFilter.filterName().length() == 0 ? cls.getName() : webFilter.filterName();
            boolean valueAttributeConfigured = webFilter.value().length > 0;
            boolean urlPatternsAttributeConfigured = webFilter.urlPatterns().length > 0;
            if (valueAttributeConfigured && urlPatternsAttributeConfigured) {
                throw new DeploymentException("value and urlPatterns must not be configured on the same WebFilter annotation in the class " + cls.getName());
            }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.filterName()

        for (Class<?> cls : classes) {
            if (!Filter.class.isAssignableFrom(cls)) {
                throw new DeploymentException("The class " + cls.getName() + " with WebFilter annotation must implement javax.servlet.Filter");
            }
            WebFilter webFilter = cls.getAnnotation(WebFilter.class);
            String filterName = webFilter.filterName().length() == 0 ? cls.getName() : webFilter.filterName();
            boolean valueAttributeConfigured = webFilter.value().length > 0;
            boolean urlPatternsAttributeConfigured = webFilter.urlPatterns().length > 0;
            if (valueAttributeConfigured && urlPatternsAttributeConfigured) {
                throw new DeploymentException("value and urlPatterns must not be configured on the same WebFilter annotation in the class " + cls.getName());
            }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.filterName()

                new Object[] { filterClass.getName(), WebFilter.class.getName(), javax.servlet.Filter.class.getName() }));
            return getDefaultFailedResult();
        }

        WebFilter webFilterAn = (WebFilter)ainfo.getAnnotation();
        String filterName = webFilterAn.filterName();
        if (filterName == null || filterName.length() == 0) {
            filterName = filterClass.getName();
        }

        ServletFilterDescriptor servletFilterDesc = null;
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.filterName()

        {
            LOG.warn(clazz.getName()+" defines both @WebFilter.value and @WebFilter.urlPatterns");
            return;
        }

        String name = (filterAnnotation.filterName().equals("")?clazz.getName():filterAnnotation.filterName());
        String[] urlPatterns = filterAnnotation.value();
        if (urlPatterns.length == 0)
            urlPatterns = filterAnnotation.urlPatterns();

        FilterHolder holder = _context.getServletHandler().getFilter(name);
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.filterName()

        {
            LOG.warn(clazz.getName()+" defines both @WebFilter.value and @WebFilter.urlPatterns");
            return;
        }

        String name = (filterAnnotation.filterName().equals("")?clazz.getName():filterAnnotation.filterName());
        String[] urlPatterns = filterAnnotation.value();
        if (urlPatterns.length == 0)
            urlPatterns = filterAnnotation.urlPatterns();

        FilterHolder holder = _context.getServletHandler().getFilter(name);
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.filterName()

    protected void processConfigAnnotations(Class<?> clazz) {

        if (clazz.isAnnotationPresent(WebFilter.class)) {
            WebFilter annotation = clazz.getAnnotation(WebFilter.class);
            // Add servlet filter
            String filterName = annotation.filterName();
            FilterDef filterDef = new FilterDef();
            filterDef.setFilterName(annotation.filterName());
            filterDef.setFilterClass(clazz.getName());
            WebInitParam[] params = annotation.initParams();
            for (int i = 0; i < params.length; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.