I am not able to render the image inside the jsp. Everything else is working fine i.e. all the data is being renderred. its only the image which is causing the issue. And I know the path is correct
<img src="https://localhost/genesis/images/client-logo1.png" alt="Image not available">
or
<img src="/images/client-logo1.png" alt="Image not available">
The below code renders the jsp
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();
}
}
i have tried a few approach but nothing seems to be working. The jsp is loaded into a jeditorPane and an image is created from it.
At max i can see is some sort of broken or unrenderred image with a sun and mountain... not sure what it is
Can someone please help me out with this?