Package javax.ws.rs

Examples of javax.ws.rs.ApplicationPath


                appInstance = Application.class.cast(appClazz.newInstance());
            } catch (Exception e) {
                throw new OpenEJBRestRuntimeException("can't create class " + app, e);
            }

            ApplicationPath path = appClazz.getAnnotation(ApplicationPath.class);
            if (path != null) {
                String appPath = path.value();
                if (appPath.startsWith("/")) {
                    appPrefix += appPath.substring(1);
                } else {
                    appPrefix += appPath;
                }
View Full Code Here


            //look for servlet mappings
            if (!servletMappingsExist(webdata, servletName)) {
                //no mappings, add our own
                List<String> patterns = new ArrayList<String>();
                if (resteasy.getScannedApplicationClass().isAnnotationPresent(ApplicationPath.class)) {
                    ApplicationPath path = resteasy.getScannedApplicationClass().getAnnotation(ApplicationPath.class);
                    String pathValue = path.value().trim();
                    if (!pathValue.startsWith("/")) {
                        pathValue = "/" + pathValue;
                    }
                    String prefix = pathValue;
                    if (pathValue.endsWith("/")) {
View Full Code Here

        }
       
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        String address = "/";
        if (!ignoreAppPath) {
            ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
            if (appPath != null) {
                address = appPath.value();
            }
        }
        if (!address.startsWith("/")) {
            address = "/" + address;
        }
View Full Code Here

        }
       
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        String address = "/";
        if (!ignoreAppPath) {
            ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
            if (appPath != null) {
                address = appPath.value();
            }
        }
        if (!address.startsWith("/")) {
            address = "/" + address;
        }
View Full Code Here

        restServletInfo.getInitParam().add(paramDeploymentConfig);

        if (applicationClass.isAnnotationPresent(ApplicationPath.class)) {

            ApplicationPath ap = applicationClass.getAnnotation(ApplicationPath.class);

            String mapping = ap.value();

            if (!mapping.startsWith("/") || !mapping.startsWith("*.")) {

                mapping = "/" + mapping;
            }
View Full Code Here

            //look for servlet mappings
            if (!servletMappingsExist(webdata, servletName)) {
                //no mappings, add our own
                List<String> patterns = new ArrayList<String>();
                if (resteasy.getScannedApplicationClass().isAnnotationPresent(ApplicationPath.class)) {
                    ApplicationPath path = resteasy.getScannedApplicationClass().getAnnotation(ApplicationPath.class);
                    String pathValue = path.value().trim();
                    if (!pathValue.startsWith("/")) {
                        pathValue = "/" + pathValue;
                    }
                    String prefix = pathValue;
                    if (pathValue.endsWith("/")) {
View Full Code Here

            //look for servlet mappings
            if (!servletMappingsExist(webdata, servletName)) {
                //no mappings, add our own
                List<String> patterns = new ArrayList<String>();
                if (resteasy.getScannedApplicationClass().isAnnotationPresent(ApplicationPath.class)) {
                    ApplicationPath path = resteasy.getScannedApplicationClass().getAnnotation(ApplicationPath.class);
                    String pathValue = path.value().trim();
                    if (!pathValue.startsWith("/")) {
                        pathValue = "/" + pathValue;
                    }
                    String prefix = pathValue;
                    if (pathValue.endsWith("/")) {
View Full Code Here

        }
       
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        String address = "/";
        if (!ignoreAppPath) {
            ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
            if (appPath != null) {
                address = appPath.value().length() == 0 ? "/" : appPath.value();
            }
        }
        bean.setAddress(address);
        bean.setStaticSubresourceResolution(staticSubresourceResolution);
        bean.setResourceClasses(resourceClasses);
View Full Code Here

        }
       
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        String address = "/";
        if (!ignoreAppPath) {
            ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
            if (appPath != null) {
                address = appPath.value().length() == 0 ? "/" : appPath.value();
            }
        }
        bean.setAddress(address);
        bean.setStaticSubresourceResolution(staticSubresourceResolution);
        bean.setResourceClasses(resourceClasses);
View Full Code Here

        restServletInfo.getInitParam().add(paramDeploymentConfig);

        if (applicationClass.isAnnotationPresent(ApplicationPath.class)) {

            ApplicationPath ap = applicationClass.getAnnotation(ApplicationPath.class);

            String mapping = ap.value();

            if (!mapping.startsWith("/") || !mapping.startsWith("*.")) {

                mapping = "/" + mapping;
            }
View Full Code Here

TOP

Related Classes of javax.ws.rs.ApplicationPath

Copyright © 2018 www.massapicom. 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.