/** * Use this method to enable hot deploy of your html templates on development. Works only with * jetty. Only for * * @param application * the new html hot deploy */ public static void setHtmlHotDeploy(final WebApplication application) { application.getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); final String slash = "/"; String realPath = application.getServletContext().getRealPath(slash); if ((realPath != null) && !realPath.endsWith(slash)) { realPath += slash; } final String javaSourcePath = realPath + "../java"; final String resourcesPath = realPath + "../resources"; addResourceFinder(application, javaSourcePath); addResourceFinder(application, resourcesPath); }
public void init(final Application application) { // disable ModificationWatcher application.getResourceSettings().setResourcePollFrequency(null); // use plain JDK Object(Input|Output)Stream ISerializer serializer = new GaeObjectSerializer(application.getApplicationKey()); application.getFrameworkSettings().setSerializer(serializer); // save older version of pages in the HttpSession final IDataStoreEvictionStrategy evictionStrategy; if (application instanceof GaeApplication) { evictionStrategy = ((GaeApplication)application).getEvictionStrategy(); } else { evictionStrategy = new PageNumberEvictionStrategy(10); } application.setPageManagerProvider(new GaePageManagerProvider(application, evictionStrategy)); // disable file cleaning because it starts a new thread application.getResourceSettings().setFileCleaner(null); }
getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); getResourceSettings().setJavaScriptCompressor(null); getResourceSettings().setUseMinifiedResources(false); getResourceSettings().setResourcePollFrequency(null); getResourceSettings().setJavaScriptCompressor(new DefaultJavaScriptCompressor()); getMarkupSettings().setStripWicketTags(true);
getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); getResourceSettings().setJavaScriptCompressor(null); getResourceSettings().setUseMinifiedResources(false); getResourceSettings().setResourcePollFrequency(null); getResourceSettings().setJavaScriptCompressor(new DefaultJavaScriptCompressor()); getMarkupSettings().setStripWicketTags(true);
/** * Sets the deployment settings for deployment mode for the given application. * * @param application * the application to set the settings */ public static void setDeploymentModeConfiguration(final Application application) { application.getMarkupSettings().setStripComments(true); // The resources are never polled. This are properties, html, // css, js files. application.getResourceSettings().setResourcePollFrequency(null); application.getResourceSettings() .setJavaScriptCompressor(new DefaultJavaScriptCompressor()); // set the behavior if an missing resource is found... application.getResourceSettings().setThrowExceptionOnMissingResource(false); // debug settings... application.getDebugSettings().setComponentUseCheck(false); application.getDebugSettings().setAjaxDebugModeEnabled(false); application.getDebugSettings().setDevelopmentUtilitiesEnabled(false); application.getDebugSettings().setOutputMarkupContainerClassName(false); application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(false); application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(false); }
application.getResourceSettings().setResourcePollFrequency(getResourcePollFrequency());
application.getResourceSettings().setResourcePollFrequency(getResourcePollFrequency());