Cin.白术 2025-07-04 14:14 采纳率: 100%
浏览 8
已结题

jsp页面代码丢失,请教问题在哪怎么解决

img

img

idea+tomcat 都是相同的模版代码,为什么有些页面会在中间断开?ctrl+F5重载资源也没用
而且被中断的部分也就是一个常规的svg矢量图,已经发生很多次了,都是在这张图附近,但是其他页面能运行,应该没啥毛病吧

<i style="display:block;"><?xml version="1.0" encoding="UTF-8"?>
    <svg width="12" height="12" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M38 8H10C8.89543 8 8 8.89543 8 10V38C8 39.1046 8.89543 40 10 40H38C39.1046 40 40 39.1046 40 38V10C40 8.89543 39.1046 8 38 8Z" fill="rgba(255,255,255,0.7)" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linejoin="round"/>
    <path d="M28 20H20V28H28V20Z" fill="#393D49" stroke="#393D49" stroke-width="8" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M14.9092 2V8V2Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M14.9092 2V8" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M14.9092 40V46V40Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M14.9092 40V46" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M24 2V8V2Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M24 2V8" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M24 40V46V40Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M24 40V46" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M33.0908 2V8V2Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M33.0908 2V8" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M33.0908 40V46V40Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M33.0908 40V46" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M2 14.9092H8H2Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M2 14.9092H8" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M40 14.9092H46H40Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M40 14.9092H46" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M2 24H8H2Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M2 24H8" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M40 24H46H40Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M40 24H46" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M2 33.0908H8H2Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M2 33.0908H8" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M40 33.0908H46H40Z" fill="rgba(255,255,255,0.7)"/>
    <path d="M40 33.0908H46" stroke="rgba(255,255,255,0.7)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
                                </i>
  • 写回答

5条回答 默认 最新

  • 阿里嘎多学长 2025-07-04 14:14
    关注

    阿里嘎多学长整理AIGC生成,因移动端显示问题导致当前答案未能完全显示,请使用PC端查看更加详细的解答过程

    问题分析

    你遇到的问题是,某些 JSP 页面的代码会突然中断,导致页面无法正确显示。这个问题可能是由于 IDEA 或 Tomcat 的缓存问题引起的。

    解决方案

    1. 清除 IDEA 的缓存:在 IDEA 中,File -> Invalidate Caches/Restart,选择 Invalidate and Restart,重启 IDEA。
    2. 清除 Tomcat 的缓存:在 Tomcat 的配置文件 server.xml 中,添加 <Manager pathname="" /> 元素,以禁用缓存。
    3. 检查 JSP 代码:检查 JSP 代码是否有任何错误或语法问题,可能会导致代码中断。
    4. 检查 SVG 图片:检查 SVG 图片是否正确地被引入和渲染,可能会导致页面中断。
    5. 尝试使用不同的浏览器:尝试使用不同的浏览器来访问页面,可能会发现问题是浏览器相关的。

    提示

    如果以上解决方案都不能解决问题,你可以尝试在 IDEA 中启用 debug 模式,来检查 JSP 代码的执行过程,可能会发现问题的根源。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

问题事件

  • 系统已结题 7月12日
  • 已采纳回答 7月4日
  • 创建了问题 7月4日