Project

General

Profile

Actions

Bug #11138

open

Widget gallery: images and icons are not loaded (404) when not deployed at the servlet container's root

Added by Roel Standaert about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Roel Standaert
Category:
-
Target version:
Start date:
12/07/2022
Due date:
% Done:

100%

Estimated time:

Description

If the context path is anything other than empty (e.g. the default /jwt-gallery if you add jwt-gallery.war to the webapps folder in Tomcat), then the (J)Wt logo and any other images result in a 404.

This is because the template text uses <img src="/pics/..."> and <img src="/icons/...">, while the files can actually be found at <img src="CONTEXTPATH/pics/...> and <img src="CONTEXTPATH/icons/...>.

Note that simply writing it as <img src="pics/..."> or <img src="icons/..."> does not work because of internal paths. The desired location should pass through WApplication#resolveRelativeUrl().

Actions #1

Updated by Roel Standaert about 2 years ago

  • Status changed from InProgress to Review
  • Assignee changed from Roel Standaert to Korneel Dumon
Actions #2

Updated by Roel Standaert about 2 years ago

  • Assignee changed from Korneel Dumon to Roel Standaert
Actions #3

Updated by Roel Standaert about 2 years ago

  • Status changed from Review to Resolved
Actions #4

Updated by Roel Standaert about 2 years ago

  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF