jeudi 28 décembre 2017

Styles not applied to HTML pages loaded using window.open in Tomcat web application

I am trying to load a help page in a new popup window as shown in the code below:

<a href="#" onclick="window.open('/abc.htm', null,'width=500px,height=600px,scrollbars=yes,resizable=yes');" > <img src="/images/icons/xyz.gif" valign="middle" border="0"/> </a>

My application is a J2EE web application deployed on Tomcat 8. The web pages for the help files are HTML files present in the root directory in the webapps folder in Tomcat. The stylesheets and JavaScripts are stored in sub folders in the root directory.

My issue is that when the help page is loaded none of the styles are applied to it. However if I am loading the help file by double clicking on it then all the styles are applied. Only when it is loaded through Tomcat I am having this issue.

The chrome console is showing the below warning:

Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/Skins/Default/Stylesheets/Styles.css".

Can somebody please explain what am I doing wrong here?




Aucun commentaire:

Enregistrer un commentaire