REQUEST
}
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
addLibraryToWebModule(webModule, STRIPES_LIB_NAME);
log.info("stripes library added");
if (frameworkPanel.getIncludeJSTL()) {
addLibraryToWebModule(webModule, JSTL_LIB_NAME);
log.info("jstl library added");
}
// CREATE FOLDERS FOR FILES
FileObject webInf = webModule.getWebInf();
FileObject jspf = webInf.createFolder("jspf");
FileObject jsp = webInf.createFolder("jsp");
FileObject layout = webInf.createFolder("layout");
FileObject docBase = webModule.getDocumentBase();
FileObject css = docBase.createFolder("css");
FileObject js = docBase.createFolder("js");
FileObject resourcesRoot = getProjectResourcesRoot(project);
// COPY TEMPLATE STRIPES RESOURCES (BUNDLES, LAYOUTS, CSS, JS...)
if(frameworkPanel.getCreateResourcesFile()){
Locale defaultLang = frameworkPanel.getDefaultLocalization();