当前位置: 首页 > news >正文

网站设计的软件广西建设厅网官网

网站设计的软件,广西建设厅网官网,百度首页网站推广多少钱一年,厦门安岭路网站建设今天碰到个奇怪问题,改了个页面标题再打包布署GeoServer发现调用WTMS服务失败,请求返回状态码200,返回包大小0,使用postman模拟请求是可以正常返回图片的。 跟之前版本对比如下: 正常Response请求: HTTP/1.1 200X-Fr…

今天碰到个奇怪问题,改了个页面标题再打包布署GeoServer发现调用WTMS服务失败,请求返回状态码200,返回包大小0,使用postman模拟请求是可以正常返回图片的。

跟之前版本对比如下:

正常Response请求:

   HTTP/1.1 200X-Frame-Options: SAMEORIGINX-Content-Type-Options: nosniffgeowebcache-tile-index: [13591, 9726, 14]Cache-Control: no-cache, no-store, must-revalidatePragma: no-cacheExpires: 0geowebcache-cache-result: HITgeowebcache-tile-index: [13591, 9726, 14]geowebcache-tile-bounds: 13205872.500935059,3752140.8439404294,13208318.485839844,3754586.828845214geowebcache-gridset: EPSG:3857geowebcache-crs: EPSG:3857Last-Modified: Wed, 08 Jan 2025 03:40:58 GMTContent-Disposition: inline; filename=geoserver-dispatch.imageContent-Type: image/pngContent-Length: 188615Date: Thu, 27 Feb 2025 05:48:49 GMTKeep-Alive: timeout=20Connection: keep-alive

异常Response请求:

   HTTP/1.1 200X-Frame-Options: SAMEORIGINX-Content-Type-Options: nosniffgeowebcache-tile-index: [13591, 9726, 14]Cache-Control: no-cache, no-store, must-revalidatePragma: no-cacheExpires: 0geowebcache-cache-result: HITgeowebcache-tile-index: [13591, 9726, 14]geowebcache-tile-bounds: 13205872.500935059,3752140.8439404294,13208318.485839844,3754586.828845214geowebcache-gridset: EPSG:3857geowebcache-crs: EPSG:3857Last-Modified: Wed, 08 Jan 2025 03:40:58 GMTContent-Disposition: inline; filename=geoserver-dispatch.imageContent-Type: image/pngContent-Length: 188615Date: Thu, 27 Feb 2025 05:48:49 GMTKeep-Alive: timeout=20Connection: keep-alive

发现异常中没有:Access-Control-Allow-Origin
才想起来之前好像配置过跨域:

修改跨域:web.xml

注意如果按deepseek推荐使用org.eclipse.jetty.servlets.CrossOriginFilter这个类需要添加jar包(jetty-servlets-9.4.56.v20240826.jar, jetty-util-9.4.56.v20240826.jar)

下面我推荐tomcat的,不用加jar包

<!-- Uncomment following filter to enable CORS in Tomcat. Do not forget the second config block further down. --><filter><filter-name>cross-origin</filter-name><filter-class>org.apache.catalina.filters.CorsFilter</filter-class><init-param><param-name>cors.allowed.origins</param-name><param-value>*</param-value></init-param><init-param><param-name>cors.allowed.methods</param-name><param-value>GET,POST,PUT,DELETE,HEAD,OPTIONS</param-value></init-param><init-param><param-name>cors.allowed.headers</param-name><param-value>*</param-value></init-param></filter><!-- Uncomment following filter-mapping to enable CORS --><filter-mapping><filter-name>cross-origin</filter-name><url-pattern>/*</url-pattern></filter-mapping>

完了记录清理Tomcat缓存:apache-tomcat-8.5.99\work\Catalina\localhost
重启Tomcat就可以正常使用。

如果需要修改缓存目录,修改geoserver中web.xml,增加

   <context-param><param-name>GEOSERVER_DATA_DIR</param-name><param-value>E:\map\geoserver-2.15.0\webapps\geoserver\data</param-value></context-param><context-param><param-name>GEOWEBCACHE_CACHE_DIR</param-name><param-value>E:\map\geoserver-2.15.0\cache</param-value></context-param> 
http://www.yayakq.cn/news/824991/

相关文章:

  • 做网站的岗位好吗天元建设集团有限公司 李增启
  • 网站开发费用预算网络整合营销理论概念
  • 公司简历模板电子版seo推广关键词公司
  • 房地产网站加盟北京建站开发
  • 襄阳网站制作公司有哪些找工程做在哪个网站?
  • 网站建设 软件有哪些方面房产中介哪家口碑比较好
  • 怎样制作网站汕头seo外包平台
  • 网站建设公司有哪些网站数据分析建设
  • 网站建设添加资料辽宁建设工程信息网a类业绩定义
  • 公司网站客户案例南宁网站建设业务员
  • 电子商务网站规划与建设温州seo教程
  • 做网站 万户判断网站开发语言
  • 网站建设硬件需求培训班在哪个网站找
  • 微信网站搭建哪家好重庆哪里可以制作相册
  • 国外做论坛网站做视频网站 服务器配置
  • 建设网站可以赚钱吗珠海北京网站建设
  • 网站设计与编辑好用的外贸网站
  • 我的世界做皮肤的网站专业建设的意义
  • 网站开发php程序员个人开发的软件能卖吗
  • 网站建设网站需要什么软件有哪些百度自己的宣传广告
  • 如何做php游戏介绍网站网站建设一龙条
  • 个人网站做淘宝客违规网站开发合作运营平台合同
  • 江西建设三类人员网站云平台
  • 找人合伙做网站平台电子电路自学网站
  • 华宁网站建设设计公司给公司做网站用了方正字体
  • 国外订房网站怎么和做工程建设招标中心网站
  • 快速做网站详情页建设官网流程
  • 制作网站模板的发展空间平台推广文案
  • 青岛网站互联网公司甜品店网站开发背景
  • 织梦cms怎么做网站地图西安微官网自助建站公司