Application resource loading issue when running JBoss EAP on AWS
Issue
We are facing a static resource loading problem, regarding relative reference issue when running the application under JBoss EAP on AWS
In our web application, we have the following structure,
sample.war
--- Index.jsp
---scripts
---- xyz.js
---images
----abc.png
---include
-----tabmenu.css
---WEB-INF/web.xml
And within index.jsp we are referring these resources as relative path, as an example,
<%@ page contentType="text/html; charset=utf-8" import="NavUtilities.*,java.util.*" language="java" %>
<html lang="en">
<head>
<script type="text/javascript" src="scripts/xyz.js"></script>
.....
<link href="include/tabmenu.css" rel="stylesheet" type="text/css">
......
<!--stopindex-->
<a href="#maincontent"><img src="images/abc.png" alt="Skip Navigation" name="skipnav" width="1" height="1" border="0" id="skipnav"></a>
.....
</html>
When the index.jsp gets served, the client does not receive scripts, images, and CSS files. Same war file, when we deploy it in EAP 7.0.4, it works but it does not work in EAP 7.2. We are using OpenJDK 1.8, which is part of RHEL 7 channel.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.