Html 在jsp中呈现图像的问题

Html 在jsp中呈现图像的问题,html,jsp,jeditorpane,image-rendering,Html,Jsp,Jeditorpane,Image Rendering,我无法在jsp中呈现图像。其他一切工作正常,即所有数据正在渲染。这是造成问题的唯一原因。我知道这条路是正确的 <img src="https://localhost/genesis/images/client-logo1.png" alt="Image not available"> 我尝试了一些方法,但似乎没有任何效果。 jsp被加载到jeditorPane中,并从中创建一个图像 在max我能看到的是一些破碎的或未经渲染的图像,上面有太阳和山脉。。。不知道是什么 有人能帮我解决这

我无法在jsp中呈现图像。其他一切工作正常,即所有数据正在渲染。这是造成问题的唯一原因。我知道这条路是正确的

<img src="https://localhost/genesis/images/client-logo1.png" alt="Image not available">
我尝试了一些方法,但似乎没有任何效果。 jsp被加载到jeditorPane中,并从中创建一个图像

在max我能看到的是一些破碎的或未经渲染的图像,上面有太阳和山脉。。。不知道是什么


有人能帮我解决这个问题吗?

您为jsp列出的代码是否解析了/image前缀?我想应该让它一个人呆着

您是否尝试将返回内容类型设置为image/png,因为默认JSP将返回文本/htmlImage类型适用于整个JSP,而不适用于上面的标记。。。不是吗。对不起,这对我来说有点陌生。我实际上是在定义这个jsp,呈现一个模型和一些数据。。。。然后将jsp内容发送到JeditorPane,这样我就可以得到jsp的图像。JeditorPane仅用作虚拟窗格,不存在,因为这是服务器端代码。是否可以将图像类型设置为png,然后返回一个可以与bufferred图像读取器或其他东西一起使用的图像/image只是它将指向的目录中的文件夹。。。。i、 e Webcontent/image/imageName。。。。。。我猜路径仅以这种方式指定。。如果我错了,请纠正我
<img src="/images/client-logo1.png" alt="Image not available">
HttpServletResponse charResponse = null;
     Locale locale = ProxyContextHolder.getProxyContext().getLocale();
    try {
        View view = jspViewResolver.resolveViewName(viewNameWithExtension , locale);
        StringWriter sw = new StringWriter();
        Object request = (ProxyContextHolder.getProxyContext()).getRequest();
        Object response = (ProxyContextHolder.getProxyContext()).getResponse();
        if (request != null &&  request instanceof HttpServletRequest
            && response != null &&  response instanceof HttpServletResponse) {
            HttpServletRequest httpReq = (HttpServletRequest) request;
            HttpServletResponse httpResp = (HttpServletResponse) response;
            charResponse = new CharResponseWrapper(httpResp);
            view.render(modelMap, httpReq, charResponse);
            html = charResponse.toString();
            //httpReq.getRequestDispatcher(viewNameWithExtension).include(httpReq, charResponse);
           // html = charResponse.toString();
        }
    }