在jsp页面中使用img加载jpg图片时,刚开始使用的绝对路径file:///d:/xx/xx/xx.jpg。结果一直报Not allowed to load local resource,尝试了很多次之后发现必须使用相对路径,xxx/xx.jpg这种形式。