Package org.netbeans.modules.j2ee.dd.api.web

Examples of org.netbeans.modules.j2ee.dd.api.web.WebApp


        }

        public void run() throws IOException {
            // MODIFY WEB.XML
            FileObject dd = webModule.getDeploymentDescriptor();
            WebApp webApp = DDProvider.getDefault().getDDRoot(dd);
            Project project = FileOwnerQuery.getOwner(dd);


            addServlet(webApp, DISPATCHER_SERVLET_NAME,
                    DISPATCHER_SERVLET_CLASS, frameworkPanel.getDispatcherUrl(), "1");
           
            Map<String, String> initParams = new HashMap<String, String>(4);
            initParams.put("ActionResolver.Packages", "TODO -- enter comma " +
                    "separated packages with Action Beans here");
            initParams.put("LocalePicker.Locales", getLocalePickerContent(
                    frameworkPanel.getDefaultLocalization(),
                    frameworkPanel.getIncludedLocalizations()));
//            initParams.put("Interceptor.Classes", "net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor");
//            initParams.put("MultipartWrapper.Class", "net.sourceforge.stripes.controller.multipart.CommonsMultipartWrapper");
            addFilter(webApp, "StripesFilter", FILTER_CLASS, frameworkPanel.getFilterUrl(),
                    initParams, FilterMappingDispatcher.REQUEST);

            addFilterMapping(webApp, FILTER_NAME, DISPATCHER_SERVLET_NAME,
                    FilterMappingType.SERVLET_NAME, FilterMappingDispatcher.REQUEST);


           WelcomeFileList welcomeFiles = webApp.getSingleWelcomeFileList();
            if (welcomeFiles == null) {
                try {
                    welcomeFiles = (WelcomeFileList) webApp.createBean("WelcomeFileList");
                    webApp.setWelcomeFileList(welcomeFiles);
                } catch (ClassNotFoundException ex) {
                    Exceptions.printStackTrace(ex);
                }
            }
            if (welcomeFiles.sizeWelcomeFile() == 0) {
                welcomeFiles.addWelcomeFile("index.jsp");
            }

            webApp.write(dd);
            log.info("web.xml modified");

            addFileToOpen(dd);

            // ADD libraries
View Full Code Here

TOP

Related Classes of org.netbeans.modules.j2ee.dd.api.web.WebApp

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.