1、 把mapxtreme下面的几个文件夹内的内容放tomcat安装路径下"Tomcat 5.0"webapps:mapviewer471,mapxtreme471,samples471,wmsserver111(在mapxtreme自带的tomcat文件夹webapps下)
2、 把mapxtreme中用到的jar包拷到开发目录的Lib下
3、 在web.xml中增加配置
<servlet>
<servlet-name>mapper</servlet-name>
<servlet-class>MapperServlet</servlet-class>
<init-param>
<param-name>mappath</param-name>
<param-value>f:/Program Files/MapInfo/MapXtreme-4.7.1/examples/server/data/MAP030228/XIAMEN</param-value>
</init-param>
<init-param>
<param-name>filetoload</param-name>
<param-value>f:/Program Files/MapInfo/MapXtreme-4.7.1/examples/server/data/fangfang/xmmap2.mdf</param-value>
</init-param>
<init-param>
<param-name>mapxtremeurl</param-name>
<param-value>http://fangfang:8090/mapxtreme471/servlet/mapxtreme</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>jsptagsamples</servlet-name>
<servlet-class>com.mapinfo.jsptags.RequestHandler</servlet-class>
<init-param>
<param-name>Beans</param-name>
<param-value>com.mapinfo.jsptags.mapxtreme.MapBean,
com.mapinfo.jsptags.mapxtreme.ZoomInToolBean,
com.mapinfo.jsptags.mapxtreme.ZoomOutToolBean,
com.mapinfo.jsptags.mapxtreme.RecenterToolBean,
com.mapinfo.jsptags.mapxtreme.LayerControlBean,
com.mapinfo.jsptags.mapxtreme.DisplayOptionsBean,
com.mapinfo.jsptags.mapxtreme.LabelOptionsBean,
com.mapinfo.jsptags.mapxtreme.FontOptionsBean,
com.mapinfo.jsptags.mapxtreme.MapDisplayBean,
com.mapinfo.jsptags.mapxtreme.AddTabLayerBean,
com.mapinfo.jsptags.mapxtreme.ZoomToFeatureBean</param-value>
</init-param>
<init-param>
<param-name>MapPage</param-name>
<param-value>jsptagsamples.jsp</param-value>
</init-param>
<init-param>
<param-name>TimeOut</param-name>
<param-value>900</param-value>
</init-param>
<init-param>
<param-name>MapXtremeURL</param-name>
<param-value>http://fangfang:8090/mapxtreme471/servlet/mapxtreme</param-value>
</init-param>
<init-param>
<param-name>MapFile</param-name>
<param-value>f:/Program Files/MapInfo/MapXtreme-4.7.1/examples/server/data/fangfang/xmmap2.mdf</param-value>
</init-param>
<init-param>
<param-name>RemoteMapPath</param-name>
<param-value>f:/Program Files/MapInfo/MapXtreme-4.7.1/examples/server/data/MAP030228/XIAMEN/</param-value>
</init-param>
<init-param>
<param-name>MapWidth</param-name>
<param-value>320</param-value>
</init-param>
<init-param>
<param-name>MapHeight</param-name>
<param-value>240</param-value>
</init-param>
<init-param>
<param-name>ZoomFactor</param-name>
<param-value>2.0</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>svgsample</servlet-name>
<servlet-class>com.mapinfo.jsptags.RequestHandler</servlet-class>
<init-param>
<param-name>Beans</param-name>
<param-value>com.mapinfo.jsptags.svg.SVGMapBean,
com.mapinfo.jsptags.svg.SVGZoomBean,
com.mapinfo.jsptags.mapxtreme.LayerControlBean,
com.mapinfo.jsptags.mapxtreme.OpenBean,
com.mapinfo.jsptags.mapxtreme.SaveBean,
com.mapinfo.jsptags.mapxtreme.DisplayOptionsBean,
com.mapinfo.jsptags.mapxtreme.LabelOptionsBean,
com.mapinfo.jsptags.mapxtreme.FontOptionsBean,
com.mapinfo.jsptags.mapxtreme.MapDisplayBean,
com.mapinfo.jsptags.mapxtreme.ViewEntireLayerBean</param-value>
</init-param>
<init-param>
<param-name>MapPage</param-name>
<param-value>svgsample.jsp</param-value>
</init-param>
<init-param>
<param-name>TimeOut</param-name>
<param-value>900</param-value>
</init-param>
<init-param>
<param-name>MapXtremeURL</param-name>
<param-value>http://fangfang:8090/mapxtreme471/servlet/mapxtreme</param-value>
</init-param>
<init-param>
<param-name>MapFile</param-name>
<param-value>f:/Program Files/MapInfo/MapXtreme-4.7.1/examples/server/data/fangfang/xmmap2.mdf</param-value>
</init-param>
<init-param>
<param-name>RemoteMapPath</param-name>
<param-value>f:/Program Files/MapInfo/MapXtreme-4.7.1/examples/server/data/MAP030228/XIAMEN/</param-value>
</init-param>
<init-param>
<param-name>MapWidth</param-name>
<param-value>320</param-value>
</init-param>
<init-param>
<param-name>MapHeight</param-name>
<param-value>240</param-value>
</init-param>
<init-param>
<param-name>ZoomFactor</param-name>
<param-value>2.0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>wmsclient</servlet-name>
<servlet-class>com.mapinfo.jsptags.RequestHandler</servlet-class>
<init-param>
<param-name>Beans</param-name>
<param-value>com.mapinfo.jsptags.wms.AddRemoveLayerBean,
com.mapinfo.jsptags.wms.AddRemoveServerBean,
com.mapinfo.jsptags.wms.LayerControlBean,
com.mapinfo.jsptags.wms.RecenterBean,
com.mapinfo.jsptags.wms.StyleDialogBean,
com.mapinfo.jsptags.wms.ZoomInBean,
com.mapinfo.jsptags.wms.ZoomOutBean,
com.mapinfo.jsptags.wms.ZoomAllBean</param-value>
</init-param>
<init-param>
<param-name>MapPage</param-name>
<param-value>wms.jsp</param-value>
</init-param>
<init-param>
<param-name>TimeOut</param-name>
<param-value>900</param-value>
</init-param>
<init-param>
<param-name>MapXtremeURL</param-name>
<param-value>http://fangfang:8090/mapxtreme471/servlet/mapxtreme</param-value>
</init-param>
<init-param>
<param-name>MapFile</param-name>
<param-value>f:/Program Files/MapInfo/MapXtreme-4.7.1/examples/server/data/fangfang/xmmap2.mdf</param-value>
</init-param>
<init-param>
<param-name>RemoteMapPath</param-name>
<param-value>f:/Program Files/MapInfo/MapXtreme-4.7.1/examples/server/data/MAP030228/XIAMEN/</param-value>
</init-param>
<init-param>
<param-name>MapWidth</param-name>
<param-value>320</param-value>
</init-param>
<init-param>
<param-name>MapHeight</param-name>
<param-value>240</param-value>
</init-param>
<init-param>
<param-name>ZoomFactor</param-name>
<param-value>2.0</param-value>
</init-param>
<init-param>
<param-name>defaultwmsurl</param-name>
<param-value>http://fangfang:8090/wmsserver111/servlet/wms</param-value>
</init-param>
<init-param>
<param-name>defaultvisiblelayers</param-name>
<param-value>Ocean,Grid,World Countries,World Capitals</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>overlay</servlet-name>
<servlet-class>OverlayImageServlet</servlet-class>
<init-param>
<param-name>mapxtremeurl</param-name>
<param-value>http://fangfang:8090/mapxtreme471/mapxtreme</param-value>
</init-param>
<init-param>
<param-name>base_image_url</param-name>
<param-value>http://fangfang:8090/samples471/</param-value>
</init-param>
<init-param>
<param-name>mdf_path</param-name>
<param-value>f:/Program Files/MapInfo/MapXtreme-4.7.1/examples/server/data/fangfang/xmmap2.mdf</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>mapper</servlet-name>
<url-pattern>/servlet/mapper</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mapper</servlet-name>
<url-pattern>/mapper</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jsptagsamples</servlet-name>
<url-pattern>/servlet/jsptagsamples</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jsptagsamples</servlet-name>
<url-pattern>/jsptagsamples</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>svgsample</servlet-name>
<url-pattern>/servlet/svgsample</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>svgsample</servlet-name>
<url-pattern>/svgsample</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>wmsclient</servlet-name>
<url-pattern>/servlet/wmsclient</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>wmsclient</servlet-name>
<url-pattern>/wmsclient</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>overlay</servlet-name>
<url-pattern>/overlay</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>overlay</servlet-name>
<url-pattern>/servlet/overlay</url-pattern>
</servlet-mapping>