html - CSS Style not applied after redirect in Icefaces 3 application on IE8 web browser -



html - CSS Style not applied after redirect in Icefaces 3 application on IE8 web browser -

i have application implemented jsf2 , icefaces3 have problems in stylesheets application. @ login style sheet applies correctly, after each redirection it's no longer correct. problem found ie browser. in faces-config.xml file when remove redirect tag (), ok except url not alter , not take business relationship tag: added forcefulness compatibility mode. import of stylesheet have tried several formula:

<!-- formule 1--> <ice:outputstyle href="#{facescontext.externalcontext.requestcontextpath}/resources/css/global.css" rel="stylesheet" type="text/css" /> <!-- formule 2--> <ice:outputstyle href="#{request.contextpath}/resources/css/global.css" rel="stylesheet" type="text/css" /> <!-- formule 3--> <ice:outputstyle href="/resources/css/global.css" rel="stylesheet" type="text/css" /> <!-- formule 4--> <link href="#{facescontext.externalcontext.requestcontextpath}/resources/css/global.css" rel="stylesheet" type="text/css"/> <!-- formule 5--> <link href="#{request.contextpath}/resources/css/global.css" rel="stylesheet" type="text/css"/>

faces-config.xml :

<?xml version="1.0" encoding="utf-8"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> <application> <variable-resolver>org.springframework.web.jsf.delegatingvariableresolver</variable-resolver> <variable-resolver>org.springframework.web.jsf.springbeanvariableresolver</variable-resolver> <el-resolver>org.springframework.web.jsf.el.springbeanfaceselresolver</el-resolver> </application> <managed-bean> <managed-bean-name>rendermanager</managed-bean-name> <managed-bean-class>com.icesoft.faces.async.render.rendermanager</managed-bean-class> <managed-bean-scope>application</managed-bean-scope> </managed-bean> <factory> <exception-handler-factory> com.omb.exception.customexceptionhandlerfactory </exception-handler-factory> </factory> <navigation-rule> <from-view-id>*</from-view-id> <navigation-case> <from-outcome>homehotel</from-outcome> <to-view-id>/pages/home/home.xhtml</to-view-id> <redirect /> </navigation-case> <navigation-case> <from-outcome>disconnect</from-outcome> <to-view-id>/login.xhtml</to-view-id> <redirect /> </navigation-case> <navigation-case> <from-outcome>error</from-outcome> <to-view-id>/pages/errors/technicalerror.xhtml</to-view-id> <redirect /> </navigation-case> <navigation-case> <from-outcome>sessionexpired</from-outcome> <to-view-id>login.xhtml</to-view-id> </navigation-case> </navigation-rule> </faces-config>

web.xml :

<?xml version="1.0"?> <!doctype web-app public "-//sun microsystems, inc.//dtd web application 2.3//en" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>myapplication</display-name> <description>myapplication</description> <!-- without param upload not work @ 1st time icefaces 3.3.0 --> <context-param> <param-name>org.icefaces.mandatoryresourceconfiguration</param-name> <param-value>all</param-value> </context-param> <context-param> <param-name>facelets.facelets_libraries</param-name> <param-value>/pages/templates/tags.taglib.xml</param-value> </context-param> <context-param> <param-name>contextconfiglocation</param-name> <param-value> /web-inf/appctx/**/*applicationcontext*.xml </param-value> </context-param> <!-- facelet config --> <!-- <context-param> <param-name>javax.faces.application.config_files</param-name> <param-value> /web-inf/faces-config-application-beans.xml, /web-inf/faces-config-navigation.xml </param-value> </context-param> --> <!-- <context-param> <param-name>javax.faces.project_stage</param-name> <param-value>development</param-value> </context-param> --> <context-param> <param-name>facelets.development</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>javax.faces.facelets_skip_comments</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>javax.faces.validate_empty_fields</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>javax.faces.facelets_refresh_period</param-name> <param-value>-1</param-value> </context-param> <context-param> <param-name>com.icesoft.faces.standardrequestscope</param-name> <param-value>false</param-value> </context-param> <!-- specifies icefaces framework whether back upwards multiple views of single application same browser. when running in portlet environment, parameter must set true. --> <context-param> <param-name>com.icesoft.faces.concurrentdomviews</param-name> <param-value>false</param-value> </context-param> <!-- specifies icefaces framework synchronous update mode used. default, icefaces uses asynchronous update mode back upwards server-initiated updates (ajax push). setting true enable synchronous update mode , disable ajax force features. --> <context-param> <param-name>com.icesoft.faces.synchronousupdate</param-name> <param-value>true</param-value> </context-param> <!-- specifies icefaces framework whether compress server-side dom representation after each response. saves considerable amount of of memory per client. however, since decompressed/compressed every update, may not bring important memory savings applications create frequent utilize of ajax push. --> <context-param> <param-name>com.icesoft.faces.compressdom</param-name> <param-value>true</param-value> </context-param> <!-- specifies amount of time in milliseconds bridge wait response server user-initiated request before declaring connection lost. un-comment , alter default value, if necessary. --> <context-param> <param-name>com.icesoft.faces.connectiontimeout</param-name> <param-value>300000</param-value> </context-param> <!-- specifies amount of time in milliseconds idle asynchronous blocking connection should held open before beingness released. normally, blocking connection closed , re-opened every communication browser, such user interaction or heartbeat ping. purpose of setting remove possibility of threads beingness held blocked long duration on dead or inactive client connection. value should longer heartbeat interval avoid unnecessary network traffic. un-comment , alter default value, if necessary. --> <context-param> <param-name> com.icesoft.faces.blockingconnectiontimeout </param-name> <param-value>90000</param-value> </context-param> <!-- specifies amount of time in milliseconds between heartbeat messages. un-comment , alter default value, if necessary. --> <context-param> <param-name>com.icesoft.faces.heartbeatinterval</param-name> <param-value>50000</param-value> </context-param> <!-- specifies how many consecutive heartbeat connection attempts may fail before connection considered lost. un-comment , alter default value, if necessary. --> <context-param> <param-name>com.icesoft.faces.heartbeatretries</param-name> <param-value>2</param-value> </context-param> <!-- specifies number of milliseconds heartbeat request waits successful response before considered timed out. un-comment , alter default value, if necessary. --> <context-param> <param-name>com.icesoft.faces.heartbeattimeout</param-name> <param-value>60000</param-value> </context-param> <!-- specifies page uri redirect client when asynchronous connection lost. parameter value must surrounded single quotes. un-comment , alter default value, if necessary. --> <context-param> <param-name> com.icesoft.faces.connectionlostredirecturi </param-name> <param-value>login.xhtml</param-value> </context-param> <context-param> <param-name> com.icesoft.faces.sessionexpiredredirecturi </param-name> <param-value>login.xhtml</param-value> </context-param> <context-param> <param-name>com.icesoft.faces.blockuionsubmit</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.icefaces.ace.fileentry.requirejavascript</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>log4jconfiglocation</param-name> <param-value>classpath:log4j.properties</param-value> </context-param> <context-param> <param-name>log4jexposewebapproot</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>javax.faces.facelets_development</param-name> <param-value>true</param-value> </context-param> <filter> <filter-name>springfilter</filter-name> <filter-class> org.springframework.web.filter.requestcontextfilter </filter-class> </filter> <filter> <filter-name>opensessioninviewfilter</filter-name> <filter-class> org.springframework.orm.hibernate3.support.opensessioninviewfilter </filter-class> <init-param> <param-name>singlesession</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>opensessioninviewfilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>springfilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- <filter-mapping> <filter-name>loggedinfilter</filter-name> <url-pattern>/pages/*</url-pattern> </filter-mapping> --> <!-- spring --> <listener> <listener-class> org.springframework.web.util.log4jconfiglistener </listener-class> </listener> <listener> <listener-class> org.springframework.web.context.contextloaderlistener </listener-class> </listener> <listener> <listener-class> org.springframework.web.context.request.requestcontextlistener </listener-class> </listener> <listener> <listener-class> org.springframework.web.util.introspectorcleanuplistener </listener-class> </listener> <!-- listener d'initialisation de l'application --> <listener> <listener-class>com.omb.listeners.myservletcontextlistener</listener-class> </listener> <!-- faces servlet --> <servlet> <servlet-name>faces servlet</servlet-name> <servlet-class>javax.faces.webapp.facesservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>resource servlet</servlet-name> <servlet-class>com.icesoft.faces.webapp.compatresourceservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>/icefaces/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>resource servlet</servlet-name> <url-pattern>/xmlhttp/*</url-pattern> </servlet-mapping> <session-config> <session-timeout>60</session-timeout> </session-config> <!-- welcome files --> <welcome-file-list> <welcome-file>login.xhtml</welcome-file> </welcome-file-list> <error-page> <error-code>500</error-code> <location>/pages/error.jsp</location> </error-page> <error-page> <exception-type>java.lang.runtimeexception</exception-type> <location>/pages/error.jsp</location> </error-page> </web-app>

login.xhtml :

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:ace="http://www.icefaces.org/icefaces/components" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <!-- ice:outputstyle href="/resources/css/global.css" rel="stylesheet" type="text/css" /--> <ice:outputstyle href="#{facescontext.externalcontext.requestcontextpath}/resources/css/mycss.css" rel="stylesheet" type="text/css" /> </h:head> <h:body onload='document.getelementbyid("loginform:login").focus()'> <ice:form id="loginform"> <h:panelgroup id="page" styleclass="mainmaster" layout="block"> <h:panelgroup id="header" styleclass="header" layout="block"> <h:panelgroup styleclass="logo" layout="block"> <ice:graphicimage styleclass="imglogo" value="/resources/images/common/logo/logo.png" /> </h:panelgroup> </h:panelgroup> <h:panelgroup id="content" styleclass="maincontent" layout="block"> <h:panelgroup styleclass="content" layout="block"> <h:panelgroup styleclass="txtlogin" layout="block"> <span><ice:outputlabel value="#{msg['login']}" /> : * </span> <ice:inputtext value="#{loginbean.login}" id="login" /> </h:panelgroup> <h:panelgroup styleclass="txtlogin" layout="block"> <span><ice:outputlabel value="#{msg['password']}" /> : *</span> <ice:inputsecret value="#{loginbean.password}" action="#{loginbean.dologin}" /> <br /> <span></span> </h:panelgroup> <h:panelgroup styleclass="txtlogin" layout="block"> <span></span> <ice:commandbutton id="loginbutton" value="#{msg['log.on']}" action="#{loginbean.dologin}" /> </h:panelgroup> <h:panelgroup layout="block"> <ace:panel style="border: 0px;"> <ace:message id="formmsg" for="loginform" initeffect="slide" /> </ace:panel> </h:panelgroup> </h:panelgroup> </h:panelgroup> <h:panelgroup id="footer" styleclass="footer" layout="block"> <ui:insert name="footer"> <ui:include src="/pages/layer/footer/footer.xhtml" /> </ui:insert> </h:panelgroup> </h:panelgroup> </ice:form> </h:body> </html>

template.xhtml :

<?xml version="1.0" encoding="utf-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:ice="http://www.icesoft.com/icefaces/component"> <h:head> <meta http-equiv="content-type" content="text/html; charset=utf-8"></meta> <meta http-equiv="x-ua-compatible" content="ie=8" /> <title><ui:insert name="title">myapplication</ui:insert></title> <ice:outputstyle href="/xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css" /> <!-- ice:outputstyle href="#{request.contextpath}/resources/css/global.css" rel="stylesheet" type="text/css" /--> <ice:outputstyle href="#{facescontext.externalcontext.requestcontextpath}/resources/css/global.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> jsf.ajax.addonerror(function(data) { if (data.responsetext.indexof("sessionexpiredexception") > 0) { window.location = "login.xhtml"; } }); // french initialization ice.ace.locales['fr'] = { closetext : 'fermer', prevtext : 'précédent', nexttext : 'suivant', currenttext : 'courant', monthnames : [ 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre' ], monthnamesshort : [ 'jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jul', 'aoû', 'sep', 'oct', 'nov', 'déc' ], daynames : [ 'dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi' ], daynamesshort : [ 'dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam' ], daynamesmin : [ 'di', 'lu', 'ma', 'me', 'je', 've', 'sa' ], weekheader : 'sm', dateformat : 'dd/mm/yy', firstday : 1, isrtl : false, showmonthafteryear : false, yearsuffix : '' }; </script> </h:head> <h:body> <h:panelgroup id="page" styleclass="mainmaster" layout="block"> <h:panelgroup id="header" styleclass="header" layout="block"> <ui:insert name="header"> <ui:include src="/pages/layer/header/#{contextbean.templateheadername}" /> </ui:insert> </h:panelgroup> <h:panelgroup id="headermenu" styleclass="menu" layout="block"> <ui:insert name="buttons"> <ui:include src="/pages/layer/menu/#{contextbean.templatemenubuttonname}" /> </ui:insert> </h:panelgroup> <h:panelgroup id="main" styleclass="maincontent" layout="block"> <h:panelgroup id="content" styleclass="content" layout="block"> <h:panelgroup layout="block" rendered="#{not facescontext.validationfailed , not empty facescontext.messagelist}"> <h:messages id="psuedoglobalmessages" globalonly="true" infostyle="color:blue" errorstyle="color:red" warnclass="color:orange" showdetail="false" showsummary="true" /> </h:panelgroup> <ui:insert name="content" /> </h:panelgroup> </h:panelgroup> <h:panelgroup id="footer" styleclass="footer" layout="block"> <ui:insert name="footer"> <ui:include src="/pages/layer/footer/footer.xhtml" /> </ui:insert> </h:panelgroup> </h:panelgroup> </h:body> </html>

i found solution :

first changed implementation of login.xhtml page includes in facelet template.

second : added doctype balise @ origin of template.xhtml

now sheetstyle applied in pages.

for compatibility mode made httpfilter set attribute :

((httpservletresponse) response).setheader("x-ua-compatible", this.xuacompatible);

html css internet-explorer-8 icefaces-3

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -