I have some problems with Tomcat/GeoServer. I was able to create project in stand-alone GeoServer and all works fine.
This is my code.
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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}
div.info {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;
}
</style>
<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,
projection:"EPSG:70066",
units:'m'}
function init(){
map = new OpenLayers.Map( 'map', options);
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://localhost:8080/geoserver/wms", {layers: 'cite:filedata'} );
map.addLayer(layer);
map.zoomToExtent(extend);
// <!--map.setCenter(extend.getCenterLonLat(), map.getZoomForExtent(extend));-->
map.addControl( new OpenLayers.Control.LayerSwitcher() );
}
</script>
</head>
<body onload="init()">
<div class="ol"> <div id="map"></div> </div>
</body>
</html>
But when I try to put this in Tomcat nothing happens and I don't see a map. What do I need to do with Tomcat to run project which uses GeoServer?
I know my English is terrible.