I have faced a very strange issue with jsp:include tag in WebLogic12c and have no clue how to find the root cause or fix it. Please help!!!
I am using on my project Struts 2.5.10.1 and Tiles 3.0.7. The JSP page is very simple. It basically uses tiles template and provides content for central frame using another JSP page which is dynamically included like this:
...
<tiles:insertDefinition name="defaultLayout">
<tiles:putAttribute name="content">
<div id="fragment-connection" class="aetab-content">
<jsp:include page="idas_tab_connect.jsp" />
</div>
</tiles:putAttribute>
</tiles:insertDefinition>
...
The issue is that instead of entire content of the idas_tab_connect.jsp page only text is included. All HTML markup is simply gone. Even instead of input text field I see on the resulted page just values.
The same code works fine on JBoss 6.4 and Tomcat 7 and 8. So it seems this is some WebLogic-specific issue.
Thank you for your help in advance.
Additional details:
- JDK - 1.7;
- Servlet version - 2.4;
- OS - Windows 10, x64;
The generated HTML looks like this:
<div id="fragment-connection" class="aetab-content"> Connection SettingsLDAP Connection SettingsHost:Port:389Use SSL:Trusted keystore file location on server:User DN:Password:Confirm Password: </div>
Root cause
As I mentioned below in my comment I found the root cause - page encoding/charset set in the included page as "UTF-8"
<%@page contentType="text/html; charset=UTF-8" %>
If I change charset/pageEncoding to "utf-8", "utf8" or something completely wrong, for instance "xxxx" or remove it everything starts working fine for me.
Very strange issue. At least now I have a workaround.