Package org.geoserver.script

Examples of org.geoserver.script.ScriptSession


    }

    @Override
    public void handlePost() {
        String ext = (String) getRequest().getAttributes().get("ext");
        ScriptSession session = scriptMgr.createNewSession(ext);
        if (session == null) {
            throw new RestletException("Unable to create session", Status.SERVER_ERROR_INTERNAL);
        }

        PageInfo page = (PageInfo) getRequest().getAttributes().get(PageInfo.KEY);

        getResponse().redirectSeeOther(page.pageURI(String.valueOf(session.getId())));
        getResponse().setEntity(new StringRepresentation(String.valueOf(session.getId())));
        getResponse().setStatus(Status.SUCCESS_CREATED);

    }
View Full Code Here


    }

    @Override
    public void handlePut() {
        long sid = Long.valueOf((String)getRequest().getAttributes().get("session"));
        ScriptSession session = scriptMgr.findSession(sid);
        ScriptEngine engine = session.getEngine();

        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        Writer w = new PrintWriter(output);

        engine.getContext().setWriter(w);
View Full Code Here

TOP

Related Classes of org.geoserver.script.ScriptSession

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.