JSF Bean getting called twice on IE 11

129 Views Asked by At

My JSF bean getting called twice on IE11. But the same program running properly, when I use FireFox and Chrome. I have done the deployment on Oracle Weblogic. I using ViewScoped to keep the bean keep alive till webpage is active.

    @ManagedBean(name = "callingBean", eager = true)
    @ViewScoped
    public class CallingBean implements Serializable 

   <h:head>
   <title>JSF DEMO</title>
   <h:outputStylesheet library="css" name="style.css" />
   </h:head>
   <h:body style="font-size: 12px">
   <p:layout fullPage="true">
   <p:layoutUnit position="center" rendered="#{callingBean.username != null}">

Below is web.xml for reference.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
id="WebApp_ID" version="3.1">
<display-name>JSF_Demo</display-name>
<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>
<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<context-param>
    <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
</context-param>
<context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
</context-param>
<context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>cupertino</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
    <param-value>true</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name>
    <param-value>8192</param-value>
</context-param>
<listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<mime-mapping>
    <extension>xhtml</extension>
    <mime-type>application/xhtml</mime-type>
</mime-mapping>
</web-app>
0

There are 0 best solutions below