Question

We are using WAS & IHS as servers and WebSEAL as reverse proxy. Application is developed using JSF 2.0 and using .xhtml pages for view.

Issue: Using ${facesContext.externalContext.requestContextPath} to generate the context for JavaScript and CSS files. When the application is accessed through WebSEAL, getting correct context for JavaScript file, but the CSS context is missing the webSEAL junction name.

In Source Code: JS is included as:

<script src="${facesContext.externalContext.requestContextPath}/js/jquery/jquery-1.6.1.min.js" type="text/javascript"></script>

CSS is included as:

var cssElement = document.createElement("link");
cssElement.setAttribute("rel", "stylesheet");
cssElement.setAttribute("type", "text/css");
cssElement.setAttribute("href", "${facesContext.externalContext.requestContextPath}/css/stylecontent.css");

Links Rendered on Browser: For JavaScript(it has context name):

<script src="/junction/appcontext/js/jquery/jquery-1.6.1.min.js" type="text/javascript"></script>

For CSS:

<link href="/appcontext/css/stylecontent.css" rel="stylesheet" type="text/css"/>

Hence, CSS files are not loading on the page.

Anyone has any hints?

Was it helpful?

Solution

Just incase some one is stuck with the same problem: It got resolved by making some configuration at the WebSEAL junction level. by default, WebSEAL looks for static resources on the the server itself, hence it strips the junction off. Settings need to be applied to "look for resources under the junction"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top