protected void service(HttpServletRequest req, HttpServletResponse res) 
    throws ServletException, IOException {
    	
    	OutputStreamWriter wr = null;
        InputStream  in       = null;
        OutputStream out      = null;

        try {
            Map<String,Object> reqMap = new HashMap<String,Object>();
            
            Enumeration<?> en = req.getParameterNames();
            String key = new String();

            /**
             * Converting all Map Keys into Upper Case
             **/
            while(en.hasMoreElements()){
                key = (String)en.nextElement();
                reqMap.put(key.toUpperCase(), req.getParameter(key));
            }
            
            wmsParamBean wmsBean = new wmsParamBean();
            BeanUtils.populate(wmsBean, reqMap);

            HttpSession session = req.getSession(true);

            /**
             * Reading the saved SLD
             **/
            String sessionName = wmsBean.getLAYER();
            
            if( sessionName.length() < 1 )
            	sessionName = wmsBean.getLAYERS();

            if( session.getAttribute(sessionName) != null) {

                wmsBean.setSLD_BODY(
                       (String)session.getAttribute(
                               sessionName) );
                wmsBean.setSLD("");
                wmsBean.setSTYLES("");
            }
          
            /**
             * Generating Map from GeoServer
             **/
            URL geoURL = new URL(this.geoserverURL);

            URLConnection geoConn = geoURL.openConnection();
            geoConn.setDoOutput(true);
            
            wr = new OutputStreamWriter(geoConn.getOutputStream(),"UTF-8");
            wr.write( wmsBean.getURL_PARAM() );
            wr.flush();

            in  = geoConn.getInputStream();
            out = res.getOutputStream();
            
            res.setContentType(wmsBean.getFORMAT());
            
            int b;         
            while((b = in.read()) != -1 ) {
                out.write(b);
            }
            
        } catch (Exception e) {
            //e.printStackTrace();
        }
        finally {
        	if( out != null ) {
        		out.flush();
        		out.close();
        	}
        	if( in != null ) {
        		in.close();
        	}
        	if( wr != null ) {
        		wr.close();
        	}
        }
    }