Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

i have a problem with HTTP request for KML to add to map. This is my HTTP request:

var x = new OpenLayers.Layer.Vector("X", {
    projection: new OpenLayers.Projection("EPSG:4326"),
    strategies: [new OpenLayers.Strategy.Fixed()],

    protocol: new OpenLayers.Protocol.HTTP({                                    
                url : "../../MyJSP.jsp",                    
                async : false,
                    format: new OpenLayers.Format.KML({
                       extractStyles: true,
                       extractAttributes: true

                params : {
                 'request' : 'typeRequest',
                 'param1' : 'a',
         'param2' :'b'                      




The request is send to MyJSP, which make some controls to decide the remote method to invoke:

String req = request.getParameter("request")==null ? "" : request.getParameter("request");

if (req.equals("typeRequest")) {    
   String param1= request.getParameter("param1");
   String param2 =   request.getParameter("param2");                

The request don't arrive here. I think that the problem is the URL ../../MyJSP.jsp.

 -- folder
 --- folder
       class to make request HTTP 

Can anybody help me? Thanks.

share|improve this question
what is firebug telling you? are you getting a 404 on the request? – CaptDragon Oct 26 '12 at 12:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.