Package org.apache.geronimo.web.info

Examples of org.apache.geronimo.web.info.WebAppInfo


public class StatTest extends AbstractWebModuleTest {

    //private ObjectName webModuleName;

    public void testStats() throws Exception {
        WebAppInfo webAppInfo = new WebAppInfo();
        setUpStaticContentServlet(webAppInfo);
        TomcatWebAppContext webModule = setUpInsecureAppContext("war1", null, null, null, null, null, webAppInfo);
            HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() + "/test/hello.txt")
                    .openConnection();
            BufferedReader reader = null;
View Full Code Here


        //Force a new realm name and ignore the application name
        SecurityHolder securityHolder = new SecurityHolder();
        securityHolder.setSecurity(false);//redundant: forces use of TomcatJAASRealm not TomcatGeronimoRealm
        securityHolder.setConfigurationFactory(this.realm);
        CredentialStore credentialStore = null;
        WebAppInfo webAppInfo = new WebAppInfo();
        webAppInfo.loginConfig = new LoginConfigInfo();
        webAppInfo.loginConfig.authMethod = "FORM";
        webAppInfo.loginConfig.realmName = "geronimo-admin";
        webAppInfo.loginConfig.formLoginPage = "/auth/logon.html?param=test";
        webAppInfo.loginConfig.formErrorPage = "/auth/logonError.html?param=test";
View Full Code Here

    ) throws Exception {

        SecurityHolder securityHolder = new SecurityHolder();
        securityHolder.setSecurity(true);
        securityHolder.setPolicyContextID(POLICY_CONTEXT_ID);
        WebAppInfo webAppInfo = new WebAppInfo();
        webAppInfo.loginConfig = new LoginConfigInfo();
        webAppInfo.loginConfig.authMethod = "FORM";
        webAppInfo.loginConfig.realmName = "geronimo-admin";
        webAppInfo.loginConfig.formLoginPage = "/auth/logon.html?param=test";
        webAppInfo.loginConfig.formErrorPage = "/auth/logonError.html?param=test";
View Full Code Here

*/
public class ApplicationTest extends AbstractWebModuleTest {
    private File basedir = new File(System.getProperty("basedir"));

    public void testApplication() throws Exception {
        WebAppInfo webAppInfo = new WebAppInfo();
        setUpStaticContentServlet(webAppInfo);
        setUpInsecureAppContext("war1",
                null,
                null,
                null,
View Full Code Here

        ApplicationPolicyConfigurationManager jacc = setUpJACC(roleDesignates, principalRoleMap, componentPermissions, policyContextId);
        LoginService loginService = newLoginService();
//        Authenticator serverAuthentication = new FormAuthenticator("/auth/logon.html?param=test", "/auth/logonError.html?param=test", true);
        Authenticator serverAuthentication = new FormAuthenticator("/auth/logon.html?param=test", "/auth/logonError.html?param=test", true);
        SecurityHandlerFactory securityHandlerFactory = new ServerAuthenticationGBean(serverAuthentication, loginService);
        WebAppInfo webAppInfo = new WebAppInfo();
        setUpStaticContentServlet(webAppInfo);
        return setUpAppContext(
                securityRealmName,
                securityHandlerFactory,
                policyContextId,
View Full Code Here

        appPath = "war1";
        super.setUp();
    }

    public void testApplication() throws Exception {
        WebAppInfo webAppInfo = new WebAppInfo();
        setUpStaticContentServlet(webAppInfo);

        setUpAppContext(null, null, "policyContextID", null, "war1/", webAppInfo);

View Full Code Here

    }

    public void testApplicationWithSessionHandler() throws Exception {
        preHandlerFactory = new MockPreHandlerFactory();
        sessionHandlerFactory = new MockSessionHandlerFactory();
        WebAppInfo webAppInfo = new WebAppInfo();
        setUpStaticContentServlet(webAppInfo);

        setUpAppContext(null, null, "policyContextID", null, "war1/", webAppInfo);

        HttpURLConnection connection = (HttpURLConnection) new URL(hostURL + "/test/hello.txt").openConnection();
View Full Code Here

    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        ServletContext servletContext = servletContextEvent.getServletContext();
        //Install GeronimoWebXml instance to the servletContext.
        WebAppInfo webAppInfo = (WebAppInfo) servletContext.getAttribute(WebApplicationConstants.WEB_APP_INFO);
        Bundle bundle = ((BundleContext) servletContext.getAttribute(WABApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE)).getBundle();
        GeronimoWebXml webXml = new GeronimoWebXml(bundle, webAppInfo, servletContext.getInitParameter("org.apache.myfaces.DELEGATE_FACES_SERVLET"));
        servletContext.setAttribute(WebXml.class.getName(), webXml);
        servletContext.setAttribute(FacesConfigurationMergerFactory.class.getName(), new GeronimoFacesConfigurationMergerFactory());
        servletContext.setAttribute(FaceletConfigResourceProviderFactory.class.getName(), new GeronimoFaceletConfigResourceProviderFactory());
View Full Code Here

        EARContext moduleContext = module.getEarContext();
        Map sharedContext = module.getSharedContext();
        //add the ServletContextListener to the web app context
        GBeanData webAppData = (GBeanData) sharedContext.get(WebModule.WEB_APP_DATA);
        // add myfaces listener
        WebAppInfo webAppInfo = (WebAppInfo) webAppData.getAttribute("webAppInfo");
        if (webAppInfo != null && !webAppInfo.listeners.contains(CONTEXT_LISTENER_NAME)) {
            webAppInfo.listeners.add(CONTEXT_LISTENER_NAME);
        } else {
            Object value = webAppData.getAttribute("listenerClassNames");
            if (value instanceof Collection && !((Collection) value).contains(CONTEXT_LISTENER_NAME)) {
View Full Code Here

        bundleContext.registerService(PackageAdmin.class.getName(), packageAdmin, null);
        builder = new JettyModuleBuilder(defaultEnvironment,
                new Integer(1800),
                new AbstractNameQuery(containerName),
                //new AbstractNameQuery(containerName),
                new WebAppInfo(),
                null,
                pojoWebServiceTemplate,
                Collections.singleton(webServiceBuilder),
                null,
                Arrays.asList(new GBeanBuilder(null, null), securityBuilder),
View Full Code Here

TOP

Related Classes of org.apache.geronimo.web.info.WebAppInfo

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.