-
Bug
-
Resolution: Duplicate
-
P3
-
8u60
-
x86
-
windows_8
FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.10240]
Win 10 not in the list!
A DESCRIPTION OF THE PROBLEM :
WebEngine does not load local package files linked in HTML via src or href directives.
example:
<script type="text/javascript" src="codemirror.js"></script>
<link rel="stylesheet" href="codemirror.css">
Additional info:
http://stackoverflow.com/questions/32429069/loading-local-javascript-file-in-webview-in-java-8u60
REGRESSION. Last worked in version 8u51
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create test.css file:
body {
background-color: green;
}
2. Create test.html file in the same packege:
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="test.css" rel="stylesheet">
<style>
body {
color: red;
}
</style>
</head>
<body>
<div>TODO write content</div>
</body>
</html>
3. load HTML file to webview via:
view.getEngine().load(this.getClass().getResource("test.html").toExternalForm());
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Page background should be green
ACTUAL -
Page background is white (default)
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.10240]
Win 10 not in the list!
A DESCRIPTION OF THE PROBLEM :
WebEngine does not load local package files linked in HTML via src or href directives.
example:
<script type="text/javascript" src="codemirror.js"></script>
<link rel="stylesheet" href="codemirror.css">
Additional info:
http://stackoverflow.com/questions/32429069/loading-local-javascript-file-in-webview-in-java-8u60
REGRESSION. Last worked in version 8u51
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create test.css file:
body {
background-color: green;
}
2. Create test.html file in the same packege:
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="test.css" rel="stylesheet">
<style>
body {
color: red;
}
</style>
</head>
<body>
<div>TODO write content</div>
</body>
</html>
3. load HTML file to webview via:
view.getEngine().load(this.getClass().getResource("test.html").toExternalForm());
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Page background should be green
ACTUAL -
Page background is white (default)
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-8136466 [regression] [WebView] Load single page application from jar
-
- Resolved
-