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

网站在线帮助如何设计网站制作公司 深圳

网站在线帮助如何设计,网站制作公司 深圳,Wordpress ajax 相册,中文 域名的网站今天碰到个奇怪问题,改了个页面标题再打包布署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/11084/

相关文章:

  • 温州seo公司亚马逊seo什么意思
  • 广西网站建设哪一家网站做简历
  • 小学学校网站建设情况资料wordpress 百度 tag
  • 镇江网站优化seo太原百度快速优化排名
  • 网站建设费能算作无形资产吗济宁住房和城乡建设厅网站
  • 网站建设依据网站做访问追踪
  • 建立 网站服务器求个网站你会感谢我的
  • 哈尔滨网站设计培训班西宁网站维护公司
  • 推荐外贸网站建设的公司做网站公司好
  • 建设五证在那个网站可以查在线外链
  • 石家网站建设公司排名网站建设 自动生成
  • 学校网站的作用和意义网站里的横幅广告怎么做
  • 宝安做网站程序员帮人做黑彩网站
  • 对网站建设的意见建议网站大图怎么优化
  • 平台网站建设教程cpa没有网站怎么做
  • 海口网站开发师招聘html点餐网页简单代码
  • 广州定制网站设计一个品牌的策划方案
  • 网站建设使用工具58同城推广技巧
  • 网站建设 团队介绍文登区城乡建设局网站
  • 上海公司网站建设以子怎么做网站的思维导图
  • 学工网站建设上海手机网站建设多少钱
  • 常用网站开发工具有哪些网站开发工程师年度总结
  • 部门门户网站建设请示做网站那几步
  • 当今做哪个网站致富wordpress设置横向菜单
  • 成为软件工程师的条件衡阳seo优化服务
  • 石狮制作网站网站建设的项目体会
  • 天津网站建设制作系统深圳网站开发是什么
  • 网页建站平台建设服务好的建筑企业查询
  • 做企业网站域名需要解析吗如何在网站中加入百度地图
  • 济南旅游网站建设现状北京托管网站