Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some problems with tomcat/geoserver. I was create project in stand-alone geoserver and all works fine. This is my code.

<%@ page language="java" contentType="text/html; charset=UTF-8"
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<title> My first JSP </title> 
<link href="http://localhost:8080/geoserver/openlayers/theme/default/style.css"type="text/css"/>
<style type="text/css">
    div.list {background-color:#dddddd; border-right:2px dashed #717dc9; width:250px; height:400px; float:right; margin-top:-395px}
    div.ol {background-color:#ffffff; height:400px; min-width:380px; max-width:3800px; margin-right:260px; padding-right:20px;margin-top:-15px} {background-color:#eeeeee; height:220px; margin-top:10px; width:100%}
    div.upload{background-color:#ffffff; height:190px; width:300px; float: right; margin-left:10px; margin:10px }
    div.accept{background-color:#ffffff; height:190px; width:300px; float: left; margin-left:10px; margin:10px }
    div.filelist {overflow: auto; height:330px; margin-left:10px}
    div.listtitle {margin-left:10px; background-color:#ffffff}
    /* General settings */
        body {
            font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
            font-size: small;
    /* The map and the location bar */
        #map {
            clear: both;
            position: relative;
            width: 687px;
            height: 330px;
            border: 1px solid black;
<script src="OpenLayers/OpenLayers.js"></script>
<script type="text/javascript">
        var lon = 150;
        var params;
        var lat = 50;
        var zoom = 6;
        var map, layer;
        var extend = new OpenLayers.Bounds(1622287.25, 383562.90625, 1623662.375, 384223.21875);
        var options = { 
                maxResolution: 5.37158203125,
                                 maxExtent: extend,
        function init(){
            map = new OpenLayers.Map( 'map', options);
            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                    "http://localhost:8080/geoserver/wms", {layers: 'cite:filedata'} );
    //        <!--map.setCenter(extend.getCenterLonLat(), map.getZoomForExtent(extend));-->
            map.addControl( new OpenLayers.Control.LayerSwitcher() );

<body onload="init()">

<div class="ol"> <div id="map"></div> </div>

But when I try to put this in tomcat nothing happens and I don't see a map. Im gonna do something with tomcat to run project which uses the Geoserver?

PS im know my english is terrible.

share|improve this question
did you copy the data directory from the jetty GeoServer to the Tomcat GeoServer? – iant Apr 26 '12 at 13:13
yes im cope OpenLayers directory in directory with project in tomcat. And create same layer with same parametrs in tomcat's geoserver. – Kliver Max Apr 26 '12 at 13:23
Also if im launch geoserver in tomcat that geoserver works fine, but project which uses geoserver dont display my map. – Kliver Max Apr 26 '12 at 13:52
up vote 1 down vote accepted

As I can see you used projection 70066 and it looks like you faced with projection issue. Check Declared SRS and Lat/Lon Bounding Box options of your layer.

share|improve this answer
Tnx. That was the problem, I forgot to add my projection in tomcat's geoserver. – Kliver Max Apr 28 '12 at 7:49

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.