Package org.vfny.geoserver.global

Examples of org.vfny.geoserver.global.GeoServer


    public WMSRequest() {
        super("WMS");
    }

    public GeoServer getGeoServer(){
      GeoServer gs = getWFS().getGeoServer();
      return gs;
    }
View Full Code Here


            }
           
            HttpSession session = request.getSession();
            ServletContext context = session.getServletContext();

            GeoServer geoServer = (GeoServer) context.getAttribute(GeoServer.WEB_CONTAINER_KEY);
           
            WmsException wmse = new WmsException(message);
            String tempResponse = wmse.getXmlResponse(geoServer.isVerboseExceptions(), request);

            response.setContentType(geoServer.getCharSet().toString());
            response.getWriter().write(tempResponse);
        }
    }
View Full Code Here

     * @see #init() for the code that sets the serviceStrategy.
     */
    protected AbstractService.ServiceStrategy getServiceStrategy()
        throws ServiceException {
        ServletContext servContext = getServletContext();
        GeoServer geoServer = (GeoServer) servContext.getAttribute(GeoServer.WEB_CONTAINER_KEY);

        //If verbose exceptions is on then lets make sure they actually get the
        //exception by using the file strategy.
        if (geoServer.isVerboseExceptions()) {
            return getServiceStrategy(FileStrategy.class);
        } else {
            return getServiceStrategy(safetyMode);
        }
    }
View Full Code Here

     *
     * @param response DOCUMENT ME!
     * @param se DOCUMENT ME!
     */
    protected void sendError(HttpServletResponse response, ServiceException se) {
        GeoServer geoServer = (GeoServer) this.getServletConfig()
                                              .getServletContext().getAttribute(GeoServer.WEB_CONTAINER_KEY);

        String mimeType = se.getMimeType(geoServer);

        send(response,
            se.getXmlResponse(geoServer.isVerboseExceptions(), curRequest),
            mimeType);
        se.printStackTrace();
    }
View Full Code Here

    public ActionForward updateGeoserver(ActionMapping mapping,
        ActionForm form,
    // UserContainer user,
    HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {
        GeoServer gs;
        ServletContext sc = request.getSession().getServletContext();

        try {
            WMSDTO wmsDTO = getWMSConfig().toDTO();
            WFSDTO wfsDTO = getWFSConfig().toDTO();
View Full Code Here

    public ActionForward updateValidation(ActionMapping mapping,
        ActionForm form,
    // UserContainer user,
    HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {
        GeoServer gs;
        ServletContext sc = request.getSession().getServletContext();
        gs = (GeoServer) sc.getAttribute(GeoServer.WEB_CONTAINER_KEY);

        try {
            Map plugins = new HashMap();
View Full Code Here

        String username = loginForm.getUsername();
        String password = loginForm.getPassword();

        //GlobalConfig global = (GlobalConfig) getServlet().getServletContext()
        //                                       .getAttribute(GlobalConfig.CONFIG_KEY);
        GeoServer geoserver = getWFS(request).getGeoServer();

        if (username.equalsIgnoreCase(geoserver.getAdminUserName())
                && password.equalsIgnoreCase(geoserver.getAdminPassword())) {
            UserContainer user = new UserContainer();
            user.setUsername(username);
            request.getSession().setAttribute(UserContainer.SESSION_KEY, user);

            String forward = (String) request.getAttribute("forward");
View Full Code Here

   * @param request
   */
  private static void setUpMockGeoServer(MockHttpServletRequest request)
      throws ConfigurationException, IOException {

    final GeoServer mockGeoServer = new GeoServer();
    final Data citeData = createTestCiteData(mockGeoServer);
    WMSDTO wmsDto = newWmsDto();
    WMS wms = new WMS(wmsDto) {
      public Data getData() {
        return citeData;
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.global.GeoServer

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.