Package org.apache.turbine.util

Examples of org.apache.turbine.util.ServerData


        catch (Exception x)
        {
            contextPath = "";
        }
        String scriptName = contextPath + req.getServletPath();
        data.setServerData(new ServerData(req.getServerName(),
                                          req.getServerPort(),
                                          req.getScheme(),
                                          scriptName,
                                          contextPath));
View Full Code Here


            else
            {
                log.info("ServerData Information retrieved from configuration.");
            }
            // Will be overwritten once the first request is run;
            serverData = new ServerData(serverName,
                    configuration.getInt(TurbineConstants.DEFAULT_SERVER_PORT_KEY,
                            URIConstants.HTTP_PORT),
                    configuration.getString(TurbineConstants.DEFAULT_SERVER_SCHEME_KEY,
                            URIConstants.HTTP),
                    configuration.getString(TurbineConstants.DEFAULT_SCRIPT_NAME_KEY),
View Full Code Here

        // for constructing URLs.

        //
        // Bundle all the information above up into a convenient structure
        //
        ServerData requestServerData = (ServerData) data.get(Turbine.class, ServerData.class);
        serverData = (ServerData) requestServerData.clone();
    }
View Full Code Here

        data.setServletConfig(config);
        // also copy data directly into pipelineData
        pipelineDataMap.put(ServletConfig.class, config);

        // Set the ServerData.
        ServerData sd = new ServerData(req);
        data.setServerData(sd);
        // also copy data directly into pipelineData
        pipelineDataMap.put(ServerData.class, sd);

        // finally put the pipelineDataMap into the pipelineData object
View Full Code Here

     * WEBAPP/resources/ui/skins/<SKIN>/images
     * directory.
     */
    public String image(String imageId)
    {
        ServerData sd = Turbine.getDefaultServerData();
        DataURI du = new DataURI(sd);

        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
View Full Code Here

     * WEBAPP/resources/ui/skins/<SKIN> directory with the
     * filename skin.css
     */
    public String getStylecss()
    {
        ServerData sd = Turbine.getDefaultServerData();
        DataURI du = new DataURI(sd);

        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
View Full Code Here

        // Set the servlet configuration.
        data.setServletConfig(config);

        // Set the ServerData.
        data.setServerData(new ServerData(req));

        return data;
    }
View Full Code Here

    {
        if(serverData == null)
        {
            log.error("ServerData Information requested from Turbine before first request!");
            // Will be overwritten once the first request is run;
            serverData = new ServerData(null, URIConstants.HTTP_PORT,
                    URIConstants.HTTP, null, null);
        }
        return serverData;
    }
View Full Code Here

    /**
     * Performs any initialization that must happen before each test is run.
     */
    protected void setUp()
    {
        ServerData sd = new ServerData("www.testserver.com",
                URIConstants.HTTP_PORT, URIConstants.HTTP,
                "/servlet/turbine", "/context");
        turi = new TurbineURI(sd);
    }
View Full Code Here

    /**
     * Performs any initialization that must happen before each test is run.
     */
    protected void setUp()
    {
        ServerData sd = new ServerData("www.testserver.com",
                URIConstants.HTTP_PORT, URIConstants.HTTP, "/servlet/turbine",
                "/context");
        turi = new TurbineURI(sd);

        parserService = (ParserService)TurbineServices.getInstance().getService(ParserService.ROLE);
View Full Code Here

TOP

Related Classes of org.apache.turbine.util.ServerData

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.