static Class<? extends LegacyApplication> getLegacyApplicationClass( VaadinService vaadinService) throws ServiceException { Properties initParameters = vaadinService.getDeploymentConfiguration() .getInitParameters(); String applicationParameter = initParameters.getProperty("application"); ClassLoader classLoader = vaadinService.getClassLoader(); if (applicationParameter == null) { throw new ServiceException( "No \"application\" init parameter found"); } try { return classLoader.loadClass(applicationParameter) .asSubclass(LegacyApplication.class); } catch (final ClassNotFoundException e) { throw new ServiceException( "Failed to load application class: " + applicationParameter, e); } }
public static boolean isKickstarter(VaadinSession session) { if(session != null) { return Boolean.parseBoolean( session.getConfiguration().getInitParameters() .getProperty("kickstarterEnvironment", "false")); } else { return false; } }
@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (handleContextRootWithoutSlash(request, response)) { return; } if (mappingPath == null) { mappingPath = findMappingPath(request); getService().getDeploymentConfiguration().getInitParameters().setProperty(PARAMETER_VAADIN_RESOURCES, mappingPath); } if (isLocalUIDL(request)) { request = new UidlRequestWrapper(request); } else if (isLocalStaticResourceRequest(request)) { request = createLocalRequestMapper(request); } super.service(request, response); }