JSF 1.2 + Shale Tiles

Hi,
I'm developing webapp with JSF 1.2 and Tiles. I think that I made everythig corect but when I'm running tha app I get following error:
java.lang.IllegalStateException: Component javax.faces.component.UIViewRoot@67ec28 not expected type. Expected: javax.faces.component.UICommand. Perhaps you're missing a tag?
     com.sun.faces.taglib.html_basic.CommandLinkTag.setProperties(CommandLinkTag.java:259)
     javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:604)
     javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1111)
     com.sun.faces.taglib.html_basic.CommandLinkTag.doStartTag(CommandLinkTag.java:364)
     org.apache.jsp.common.welcome_jsp._jspx_meth_h_005fcommandLink_005f0(welcome_jsp.java:124)
     org.apache.jsp.common.welcome_jsp._jspService(welcome_jsp.java:70)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
     com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:413)
     com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:410)
     com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:112)
     org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java:176)
     com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
     com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:243)
     com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
     javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
Can somebody help? Thx.

This is my layout:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
     <head>
          <title>Music Store</title>
     </head>
<f:view>
     <body>
          <table border="1" width="100%" cellspacing="5" height="100%">
               <tr>
                    <td colspan="3" width="100%">
                    <f:subview id="header">
                         <tiles:insert attribute="header" flush="false"/>
                         </f:subview>
                    </td>
               </tr>
               <tr>
                    <td colspan="3" width="100%">
                    <f:subview id="menu">
                         <tiles:insert attribute="menu" flush="false"/>
                         </f:subview>
                    </td>
               </tr>
               <tr>
                    <td width="20%" valign="top" align="center">
                         <tiles:insert attribute="search" flush="false"/>
                    </td>
                    <td width="*" align="center" valign="top">
                    <f:subview id="body">
                         <tiles:insert attribute="body" flush="false"/>
                         </f:subview>
                    </td>
                    <td width="20%" valign="top" align="center">
                         <tiles:insert attribute="special" flush="false"/>
                    </td>
               </tr>
               <tr>     
                    <td colspan="3" width="100%">
                         <tiles:insert attribute="footer" flush="false"/>
                    </td>
               </tr>
          </table>
     </body>
     </f:view>
</html>
This is tiles-defs:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
<tiles-definitions>
     <definition name="layoutLanguage" path="/common/layout.jsp">
          <put name="header" value="" />
          <put name="menu" value="" />
          <put name="special" value="" />
          <put name="search" value="" />
          <put name="footer" value="" />
     </definition>
     <definition name="layout" path="/common/layout.jsp">
          <put name="header" value="" />
          <put name="menu" value="/common/menu.jsp" />
          <put name="special" value="" />
          <put name="search" value="" />
          <put name="footer" value="" />
     </definition>
     <definition name="/common/welcome.tiles" extends="layout">
          <put name="body" value="/common/welcome.jsp" />
     </definition>
          <definition name="/pages/createAccount.tiles" extends="layout">
          <put name="body" value="/pages/createAccount.jsp" />
     </definition>
</tiles-definitions>
This is web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
     <context-param>
          <param-name>javax.faces.CONFIG_FILES</param-name>
          <param-value>/WEB-INF/faces-config.xml</param-value>
     </context-param>
     <!-- Tiles ViewHandler config file -->
     <context-param>
          <param-name>tiles-definitions</param-name>
          <param-value>/WEB-INF/tiles-defs.xml</param-value>
     </context-param>
     <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>0</load-on-startup>
     </servlet>
     <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.faces</url-pattern>
     </servlet-mapping>
</web-app>
This is faces-config:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
     <application>
          <view-handler>
               org.apache.shale.tiles.TilesViewHandler
          </view-handler>
     </application>
     <navigation-rule>
          <from-view-id>*</from-view-id>
          <navigation-case>
               <from-outcome>createAccount</from-outcome>
               <to-view-id>/pages/createAccount.jsp</to-view-id>
          </navigation-case>
     </navigation-rule>
     <managed-bean>
          <managed-bean-name>LocaleBean</managed-bean-name>
          <managed-bean-class>
               com.MusicStore.managedBeans.LocaleBean
          </managed-bean-class>
          <managed-bean-scope>request</managed-bean-scope>
     </managed-bean>
     <managed-bean>
          <managed-bean-name>CreateAccountBean</managed-bean-name>
          <managed-bean-class>
               com.MusicStore.managedBeans.CreateAccountBean
          </managed-bean-class>
          <managed-bean-scope>request</managed-bean-scope>
     </managed-bean>
</faces-config>
When I include f:view or f:subview in welcome.jsp the page appears but withput tiles. Maybe my layout is wrog. I was using this kind of layout durng myfaces development.

Similar Messages

  • JSF 1.2 + Shale Tiles Example needed

    Hello,
    I'm trying to develop application by using jsf 1.2 and Shale tiles. I have a problem with configuration. I was working before with Struts Tiles and MyFaces but it isn't the same.
    Can somebody provide my some exanle simle aplication of using Shale Tiles and JSF 1.2?
    Thx.

    To make templates in JSF we use Facelets here. I think Tiles = Strus , Facelets = JSF.
    Cya.

  • JSF 1.1 integration with shale-tiles-1.0.4 giving page cannot be displayed

    I am trying to get shale-tiles-1.0.4 work with JSF 1.1
    I am getting the page can not be displayed error.
    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be displayed.
    Please try the following:
    Open the 10.21.31.170:8988 home page, and then look for links to the information you want.
    Click the Refresh button, or try again later.
    Click Search to look for information on the Internet.
    You can also see a list of related sites.
    HTTP 500 - Internal server error
    Internet Explorer
    These are the steps I have followed
    I have included shale-core-1.0.4.jar and shale-tiles-1.0.4.jar in /WEB-INF/lib
    I have included the following entry in web.xml
    <servlet>
    <servlet-name>Tiles Servlet</servlet-name>
    <servlet-class>org.apache.tiles.servlets.TilesServlet;/servlet-class>
    <init-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles-defs.xml;/param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
    </servlet>
    <context-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles-defs.xml;/param-value>
    </context-param>
    <listener>
    <listener-class>
    org.apache.tiles.listener.TilesListener
    </listener-class>
    </listener>
    My tiles-defs.xml:
    <tiles-definitions>
    <definition name="/siteMainLayout" path="/tiles/layout.jsp";>
    <put name="header" value="/tiles/header.jsp";/>
    <put name="menu" value="/tiles/menu.jsp";/>
    <put name="content" value=""/>
    </definition>
    <definition name="/systemLogon" extends="/siteMainLayout">
    <put name="content" type="template" value="/welcome.jsp";/>
    </definition>
    <definition name="/systemChangePwd" extends="/siteMainLayout">
    <put name="content" type="template" value="/application/changePassword.jsp";/>
    </definition>
    <definition name="/systemMain" extends="/siteMainLayout">
    <put name="content" type="template" value="/application/mainPage.jsp";/>
    </definition>
    <definition name="/systemFailue" extends="/siteMainLayout">
    <put name="content" type="template" value="/failue.jsp";/>
    </definition>
    <definition name="/systemMain" extends="/siteMainLayout">
    <put name="content" type="template" value="/application/mainPage.jsp";/>
    </definition>
    <definition name="/systemCancel" extends="/siteMainLayout">
    <put name="content" type="template" value="/application/Misc.jsp";/>
    </definition>
    </tiles-definitions>
    My layout.jsp:
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>
    <h:panelGrid columns="2">
    <f:facet name="header">
    <f:subview id="header">
    <tiles:insert name="header" flush="false"/>
    </f:subview>
    </f:facet>
    <f:subview id="menu">
    <tiles:insert name="menu" flush="false"/>
    </f:subview>
    <f:subview id="content">
    <tiles:insert name="content" flush="false"/>
    </f:subview>
    </h:panelGrid>
    My faces-config.xml:
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <managed-bean>
    <managed-bean-name>backing_Welcome</managed-bean-name>
    <managed-bean-class>state.mn.mdh.mrc.login.Welcome;/managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1Welcome.jspx-->
    </managed-bean>
    <application>
    <view-handler>
    org.apache.shale.tiles.TilesViewHandler
    </view-handler>
    </application>
    <navigation-rule>
    <from-view-id>/systemLogon.jsp;/from-view-id>
    <navigation-case>
    <from-outcome>ChangePassword</from-outcome>
    <to-view-id>/systemChangePwd</to-view-id>
    <redirect/>
    </navigation-case>
    <navigation-case>
    <from-outcome>LoginSuccess</from-outcome>
    <to-view-id>/systemMain</to-view-id>
    <redirect/>
    </navigation-case>
    <navigation-case>
    <from-outcome>Others</from-outcome>
    <to-view-id>/systemCancel</to-view-id>
    <redirect/>
    </navigation-case>
    <navigation-case>
    <from-outcome>Failure</from-outcome>
    <to-view-id>/systemFailue</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    My systemLogon.jsp:
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>
    <html>
    <f:view>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>System Logon</title>
    </head>
    <body>
    <f:subview id="content">
    <h:form>
    <tiles:insert name="content" flush="false">
    </tiles:insert>
    </h:form>
    </f:subview>
    </body>
    </f:view>
    </html>
    The url I am trying is http://10.21.31.170:8988/Test-ViewController-context-root/faces/systemLogon.jsp
    Please assist in what I am missing.
    Thanks,
    Ambika

    Hi
    I do not see any error messages on the application server log except the server initialized message( I have included that at the end)
    But when I run the application in Firefox browser it gives me this error,
    Error instantiating web-application
    Error loading listener 'org.apache.tiles.listener.TilesListener', class not found
    When I removed the <listener> entry from web.xml and get the error,
    Error instantiating web-application
    Error instantiate servlet classes
    The message in Jdeveloper is:
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config>
    C:\jdevstudio10133\jdk\bin\javaw.exe -client -classpath C:\jdevstudio10133\j2ee\home\oc4j.jar;C:\jdevstudio10133\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -XX:MaxPermSize=256m -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    Could not canonicalize '"C:\Program Files\Sybase\Adaptive Server Anywhere 6.0\win32"' (The filename, directory name, or volume label syntax is incorrect). From system property java.library.path.
    Jun 13, 2008 10:18:21 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { location = system-jazn-data.xml, provider.type = XML, realm.default = jazn.com }
    Jun 13, 2008 10:18:21 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { provider.type = XML }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { provider.type = XML }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { location = TestWithShaleTiles-jazn-data.xml, provider.type = XML, realm.default = jazn.com }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { location = system-jazn-data.xml, deployment.url = file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-application.xml, provider.type = XML, realm.default = jazn.com }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-application.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-application.xml]
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig fileExists
    FINE: JAAS: Verify file=C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\jazn.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig getDefaultJAZNConfigFilePath
    FINE: JAAS: Configuration file=C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\jazn.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig getJAZNProperties
    FINE: JAAS: Configuration file=C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\jazn.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { idm.token.type = HTTP_COOKIE, custom.sso.key.alias = ssoSymmetricKey, idm.token.asserter.class = oracle.security.jazn.sso.SSOCookieTokenAsserter, realm.default = jazn.com, custom.sso.url.login = /jsso/SSOLogin, provider.type = XML, custom.sso.url.logout = /jsso/SSOLogout, idm.token.collector.class = oracle.security.jazn.sso.SSOCookieTokenCollector, location = ./system-jazn-data.xml, idm.authentication.name = JavaSSO, idm.token.collector.cookie.1 = ORA_OC4J_SSO }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { idm.token.type = HTTP_COOKIE, custom.sso.key.alias = ssoSymmetricKey, idm.token.asserter.class = oracle.security.jazn.sso.SSOCookieTokenAsserter, realm.default = jazn.com, deployment.url = file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/jazn.xml, custom.sso.url.login = /jsso/SSOLogin, provider.type = XML, custom.sso.url.logout = /jsso/SSOLogout, idm.token.collector.class = oracle.security.jazn.sso.SSOCookieTokenCollector, location = ./system-jazn-data.xml, idm.authentication.name = JavaSSO, idm.token.collector.cookie.1 = ORA_OC4J_SSO }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/jazn.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/jazn.xml]
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.spi.xml.XMLJAZNProvider getJAZNDataXMLDoc
    FINE: JAAS-XML: url=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-jazn-data.xml fname=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-jazn-data.xml file=C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\system-jazn-data.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.spi.xml.XMLRealmUser init
    FINE: JAZN-XML: XMLRealmUser.init: user(anonymous) is deactivated.
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.spi.xml.XMLJACCRepository init
    FINE: JACC: jaccRepo.init - JACCRepository already initialized. repo=[XMLJACCRepository isValid=true
         jaznConfig=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/jazn.xml]
         jaccPolicyMap.keySet=[]
         jaccPolicyMap.values=[]] node=oracle.xml.parser.v2.XMLElement@170984c
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.spi.xml.XMLUserManager getAdminUser
    FINE: JAZN-XML: UserManager.getAdminUser: admin.user=oc4jadmin
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.oc4j.RealmUserManager getAdminUser
    FINE: JAZN-OC4J: RealmUserManager.getAdminUser()=RealmUser: oc4jadmin
    Jun 13, 2008 10:18:23 AM com.evermind.server.jms.JMSMessages log
    INFO: JMSServer[]: OC4J JMS server recovering transactions (commit 0) (rollback 0) (prepared 0).
    Jun 13, 2008 10:18:23 AM com.evermind.server.jms.JMSMessages log
    INFO: JMSServer[]: OC4J JMS server recovering local transactions Queue[jms/Oc4jJmsExceptionQueue].
    Jun 13, 2008 10:18:23 AM oracle.oc4j.security.SSLMessages logGetSecureSocket
    FINE: getSecureSocket(address=/0.0.0.0, port=24043, backlog=30)
    Jun 13, 2008 10:18:23 AM oracle.oc4j.security.SSLMessages logGetSecureSocket
    FINE: getSecureSocket(address=/0.0.0.0, port=24043, backlog=30)
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { deployment.url = file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/application.xml, provider.type = XML }
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/application.xml
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/application.xml]
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { deployment.url = file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/application-deployments/datatags/, provider.type = XML }
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/application-deployments/datatags/
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/application-deployments/datatags/]
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { location = TestWithShaleTiles-jazn-data.xml, deployment.url = file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-oc4j-app.xml, provider.type = XML, realm.default = jazn.com }
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-oc4j-app.xml
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-oc4j-app.xml]
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.spi.xml.XMLJAZNProvider getJAZNDataXMLDoc
    FINE: JAAS-XML: url=file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-jazn-data.xml fname=file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-jazn-data.xml file=C:\jdevstudio10133\jdev\mywork\Test_Tiles\Test_with_shale_tiles\TestWithShaleTiles-jazn-data.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc findOracleHome
    FINE: JAAS: ORACLE_HOME=C:\jdevstudio10133
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc fileExists
    FINE: JAAS: Verify file=C:\jdevstudio10133\j2ee\home\config\jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc getJ2eeHomeJAZNConfigFilePath
    FINE: JAAS: Bootstrap jazn.xml @C:\jdevstudio10133\j2ee\home\config\jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig <init>
    FINE: JAAS: Configuration file=C:\jdevstudio10133\j2ee\home\config\jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig getJAZNProperties
    FINE: JAAS: Configuration file=C:\jdevstudio10133\j2ee\home\config\jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { idm.token.type = HTTP_COOKIE, custom.sso.key.alias = ssoSymmetricKey, idm.token.asserter.class = oracle.security.jazn.sso.SSOCookieTokenAsserter, realm.default = jazn.com, custom.sso.url.login = /jsso/SSOLogin, provider.type = XML, custom.sso.url.logout = /jsso/SSOLogout, idm.token.collector.class = oracle.security.jazn.sso.SSOCookieTokenCollector, location = ./system-jazn-data.xml, idm.authentication.name = JavaSSO, idm.token.collector.cookie.1 = ORA_OC4J_SSO }
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { idm.token.type = HTTP_COOKIE, custom.sso.key.alias = ssoSymmetricKey, idm.token.asserter.class = oracle.security.jazn.sso.SSOCookieTokenAsserter, realm.default = jazn.com, deployment.url = file:/C:/jdevstudio10133/j2ee/home/config/jazn.xml, custom.sso.url.login = /jsso/SSOLogin, provider.type = XML, custom.sso.url.logout = /jsso/SSOLogout, idm.token.collector.class = oracle.security.jazn.sso.SSOCookieTokenCollector, location = ./system-jazn-data.xml, idm.authentication.name = JavaSSO, idm.token.collector.cookie.1 = ORA_OC4J_SSO }
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/j2ee/home/config/jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/j2ee/home/config/jazn.xml]
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc initJ2eeHomeJAZNConfig
    FINE: JAAS: default jazn.xml @ C:\jdevstudio10133\j2ee\home\config\jazn.xml : [JAZNConfig file:/C:/jdevstudio10133/j2ee/home/config/jazn.xml]
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc getIASPropertiesFilePath
    FINE: JAAS: XML Provider
    Jun 13, 2008 10:18:27 AM oracle.security.jazn.util.Misc getIASPropertiesFilePath
    FINE: JAAS: XML Provider
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 9375 ms.
    Target URL -- http://10.21.31.170:8988/Test-ViewController-context-root/faces/systemLogon.jsp
    08/06/13 10:18:28 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    Jun 13, 2008 10:18:29 AM oracle.security.jazn.util.Misc getIASPropertiesFilePath
    FINE: JAAS: XML Provider
    Thanks for your help,
    Ambika

  • JSF 1.2 and Tiles integration

    I have a web application using JSF 1.1 and Tiles that I am trying to upgrade to run using JSF 1.2.
    It is working as far as working out that it should use the tile, but then it all seems to fall over when trying to render.
    Does anyone know if it is possible to use Tiles with JSF 1.2?
    Steven

    Hi,
    I took the Shales TileViewHandler and replaced the renderView method with the one below. This is a copy of the method from the Sun RI except that it passes the tile (ComponentDefinition) along to the subsequent methods.
    Then when it gets down to executePageToBuildView the requestURI is obtained from the tile (tile.getPath()) rather than from the UIViewRoot (viewToExecute.getViewId()).
       public void renderView(FacesContext facesContext, UIViewRoot viewToRender)
                                            throws IOException, FacesException {
          String viewId = viewToRender.getViewId();
          String tileName = getTileName(viewId);
          ComponentDefinition tile = getTile(tileName);
          if (log.isDebugEnabled()) {
             String message = null;
             try {
                 message = bundle.getString("tiles.renderingView");
             } catch (MissingResourceException e) {
                 message = "Rendering view {0}, looking for tile {1}";
             synchronized(format) {
                format.applyPattern(message);
                message = format.format(new Object[] { viewId, tileName });
             log.debug(message);
          if (tile != null) {
             if (log.isDebugEnabled()) {
                String message = null;
                try {
                    message = bundle.getString("tiles.dispatchingToTile");
                } catch (MissingResourceException e) {
                    message = "Dispatching to tile {0}";
                synchronized(format) {
                   format.applyPattern(message);
                   message = format.format(new Object[] { tileName });
                log.debug(message);
             dispatchToTile(facesContext, viewToRender, tile);
          else {
             if (log.isDebugEnabled()) {
                String message = null;
                try {
                    message = bundle.getString("tiles.dispatchingToViewHandler");
                } catch (MissingResourceException e) {
                    message = "Dispatching {0} to the default view handler";
                synchronized(format) {
                   format.applyPattern(message);
                   message = format.format(new Object[] { viewId });
                log.debug(message);
             defaultViewHandler.renderView(facesContext, viewToRender);
       private void dispatchToTile(FacesContext facesContext, UIViewRoot viewToRender, ComponentDefinition tile) throws java.io.IOException
           ExternalContext externalContext = facesContext.getExternalContext();
           Object request = externalContext.getRequest();
          Object context = externalContext.getContext();
          TilesContext tilesContext = TilesContextFactory.getInstance(context, request);
          ComponentContext tileContext = ComponentContext.getContext(tilesContext);
          if (tileContext == null) {
             tileContext = new ComponentContext(tile.getAttributes());
             ComponentContext.setContext(tileContext, tilesContext);
          else
             tileContext.addMissing(tile.getAttributes());
          renderTile(facesContext, viewToRender, tile);
          // dispatch to the tile's layout
          //externalContext.dispatch(tile.getPath());
       private void renderTile(FacesContext context, UIViewRoot viewToRender, ComponentDefinition tile) throws IOException, FacesException
           // suppress rendering if "rendered" property on the component is
           // false
           if (!viewToRender.isRendered()) {
               return;
           ExternalContext extContext = context.getExternalContext();
           ServletRequest request = (ServletRequest) extContext.getRequest();
           ServletResponse response = (ServletResponse) extContext.getResponse();
           try {
               if (executePageToBuildView(context, viewToRender, tile)) {
                   response.flushBuffer();
                   //ApplicationAssociate.getInstance(extContext).responseRendered();
                   return;
           } catch (IOException e) {
               throw new FacesException(e);
           // set up the ResponseWriter
           RenderKitFactory renderFactory = (RenderKitFactory)
           FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
           RenderKit renderKit =
                   renderFactory.getRenderKit(context, viewToRender.getRenderKitId());       
           ResponseWriter oldWriter = context.getResponseWriter();
           initBuffSize(context);
           WriteBehindStringWriter strWriter =
                 new WriteBehindStringWriter(context, bufSize);
           ResponseWriter newWriter;
           if (null != oldWriter) {
               newWriter = oldWriter.cloneWithWriter(strWriter);
           } else {
               newWriter = renderKit.createResponseWriter(strWriter, null,
                       request.getCharacterEncoding());           
           context.setResponseWriter(newWriter);
           newWriter.startDocument();
           doRenderView(context, viewToRender);
           newWriter.endDocument();
           // replace markers in the body content and write it to response.
           ResponseWriter responseWriter;
           if (null != oldWriter) {
               responseWriter = oldWriter.cloneWithWriter(response.getWriter());
           } else {
               responseWriter = newWriter.cloneWithWriter(response.getWriter());
           context.setResponseWriter(responseWriter);
           strWriter.flushToWriter(responseWriter);
           if (null != oldWriter) {
               context.setResponseWriter(oldWriter);
           // write any AFTER_VIEW_CONTENT to the response
           writeAfterViewContent(extContext, response);
       private boolean executePageToBuildView(FacesContext context, UIViewRoot viewToExecute, ComponentDefinition tile)
       throws IOException {
           if (null == context) {
               String message = MessageUtils.getExceptionMessageString
                       (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context");
               throw new NullPointerException(message);
           if (null == viewToExecute) {
               String message = MessageUtils.getExceptionMessageString
                       (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "viewToExecute");
               throw new NullPointerException(message);
           String mapping = Util.getFacesMapping(context);
           String requestURI =
                 updateRequestURI(viewToExecute.getViewId(), mapping);
           String requestURI =
               updateRequestURI(tile.getPath(), mapping);
           if (mapping.equals(requestURI)) {
               // The request was to the FacesServlet only - no path info
               // on some containers this causes a recursion in the
               // RequestDispatcher and the request appears to hang.
               // If this is detected, return status 404
               HttpServletResponse response = (HttpServletResponse)
                     context.getExternalContext().getResponse();
               response.sendError(HttpServletResponse.SC_NOT_FOUND);
               return true;
           ExternalContext extContext = context.getExternalContext();
           // update the JSTL locale attribute in request scope so that JSTL
           // picks up the locale from viewRoot. This attribute must be updated
           // before the JSTL setBundle tag is called because that is when the
           // new LocalizationContext object is created based on the locale.
           // PENDING: this only works for servlet based requests
           if (extContext.getRequest()
           instanceof ServletRequest) {
               Config.set((ServletRequest)
               extContext.getRequest(),
                          Config.FMT_LOCALE, context.getViewRoot().getLocale());
           // save the original response
           Object originalResponse = extContext.getResponse();
           // replace the response with our wrapper
           ViewHandlerResponseWrapper wrapped =
                 new ViewHandlerResponseWrapper(
                       (HttpServletResponse)extContext.getResponse());
           extContext.setResponse(wrapped);
           // build the view by executing the page
           extContext.dispatch(requestURI);       
           // replace the original response
           extContext.setResponse(originalResponse);
           // Follow the JSTL 1.2 spec, section 7.4, 
           // on handling status codes on a forward
           if (wrapped.getStatus() < 200 || wrapped.getStatus() > 299) { 
               // flush the contents of the wrapper to the response
               // this is necessary as the user may be using a custom
               // error page - this content should be propagated
               wrapped.flushContentToWrappedResponse();
               return true;           
           // Put the AFTER_VIEW_CONTENT into request scope
           // temporarily
           if (wrapped.isBytes()) {
               extContext.getRequestMap().put(AFTER_VIEW_CONTENT,
                                              wrapped.getBytes());
           } else if (wrapped.isChars()) {
               extContext.getRequestMap().put(AFTER_VIEW_CONTENT,
                                              wrapped.getChars());
           return false;
       }You will also find you need to copy a few other methods from the Sun RI.
    There were a couple of calls to ApplicationAssociate.responseRendered() which I just commented out as well (because they are not visible). They stop people changing the StateManager or ViewHandler after responses have been rendered. Probably not a problem since I will have replaced the ViewHandler anyway.
    Steven

  • Shale + tiles

    Hi, I've to do a new web application and I think about jsf+shale+tiles.
    Someone could point me to an example about shale-tiles integration, I do some pages but I get a DispatchError...
    Thanks
    lussoluca

    first make sure you are using Tiles stand-alone (in Struts Sandbox)
    add the follwoing servlet to your web.xml
    <servlet>
    <servlet-name>Tiles Servlet</servlet-name>
    <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    add the following context-param to your web.xml
    <context-param>
    <param-name>tiles-definitions</param-name>
    <param-value>/WEB-INF/tiles.xml</param-value>
    </context-param>
    add the following to your faces-config.xml
    <view-handler>org.apache.shale.tiles.TilesViewHandler</view-handler>
    add the following dependency to your pom.xml
    <dependency>
    <groupId>org.apache.shale</groupId>
    <artifactId>shale-tiles</artifactId>
    <version>1.0.3</version>
    </dependency>
    that should be it.
    Khaled

  • JSF 1.2 with tiles

    Hi
    I am using JSF with tiles and am having issues with page navigation with using tiles. Can any body tell me what to write in faces-config.xml so that the required page opens in tile which i have defined for that page in the corresponding tiles-defs.xml.
    Here is the detail of code i am using
    web.xml:
    <context-param>
    <param-name>tiles-definitions</param-name>
    <param-value>/WEB-INF/tiles-defs.xml</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>
    /WEB-INF/faces-config.xml
    </param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
    </context-param>
    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
    <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>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    faces-config.xml
    <faces-config>
    <application>
    <view-handler>
    org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl
    </view-handler>
    </application>
    <from-view-id>*</from-view-id>
    <navigation-rule>
    <navigation-case>
    <form-outcome>register</form-outcome>
    <to-view-id>/tiles/register.page</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    tiles-defs.xml
    <tiles-definitions>
    <definition name=".mainLayout" path="/tiles/main-layout.jsp">
    <put name="title" value=""/>
    <put name="header" value="/tiles/header.jsp"/>
    <put name="search-menu" value="/tiles/search-menu.jsp"/>
    <put name="body" value=""/>
    <put name="footer" value="/tiles/footer.jsp"/>
    </definition>
    <definition name="register.page" extends=".mainLayout">
    <put name="body" value="/tiles/register.jsp"/>
    </definition>
    </tiles-definitions>
    from page where we call register rule
    <h:commandLink action="register" value="Register"/>
    it opens register.jsp as new page instead of opening it into tile.
    Please helpmeout in knowing where I am wrong and let me know how to open next page in tile because welcome page is opening very well in tile but when I click for next page whose definition is defined in tiles-def.xml it doesnot open in tile
    Thanks

    Still strugling with jsf1.2+tiles

  • JSF 2.0 and Tiles with Struts and Tomahawk libs.

    I have set up an example application that extends tiles. The issue I'm seeing is that although the tiles are all rendering, the ui: tags are not rendering as html, e.g. I see ui:html, ui:head, ui:form, etc.
    Has anyone else seen this, and how did you get around it?
    Thanks,
    w

    You could define an instance Y in the same scope as 'x' and then inject it into 'x' as a managed property. This is probably dead simple using annotations. It wouldn't be hard with the XML either, just verbose.
    If you really want it to be magical, you could create an implementation of javax.el.ELResolver that creates intermediate properties when you need them. Perhaps one already exists; perhaps the Stripes code has one.

  • About jsf and tiles

    Good days , the following exception is happening:
    javax.faces.FacesException
    at de.mindmatters.faces.lifecycle.RenderResponsePhase.executePhase(RenderResponsePhase.java:53)
    at de.mindmatters.faces.lifecycle.AbstractPhase.execute(AbstractPhase.java:37)
    at de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:166)
    at de.mindmatters.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:226)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:406)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:313)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
    Caused by: java.lang.NullPointerException
    at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:168)
    at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
    at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:221)
    at de.mindmatters.faces.lifecycle.RenderResponsePhase.executePhase(RenderResponsePhase.java:45)
    ... 21 more
    my web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>true</param-value>
    <description>
    Set this flag to true if you want the JSF
    Reference Implementation to verify that all of the application
    objects you have configured (components, converters,
    renderers, and validators) can be successfully created.
    Default value is false.
    Poner a false cuando se ponga en produccion.
    </description>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    <description>
    Set this flag to true if you want the JSF
    Reference Implementation to validate the XML in your
    faces-config.xml resources against the DTD. Default
    value is false.
    Poner a false cuando se ponga en produccion.
    </description>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    <description>
    Indica donde queremos guardar el estado de la aplicacion.
    Poner a server cuando se ponga en produccion. antes probarlo!
    </description>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
    <description>
    Este parametro le dice a MyFaces si se va a permitir renderizar javascript.
    Default: "true"
    </description>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
    <description>
    si es verdadero, el renderizado html estara formateado, permitiendo que se pueda leer
    bien. En la fase de desarrollo, estara a true, cuando este en produccion, estara a false.
    </description>
    </context-param>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    <!-- listener de spring-->
    <listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- Tiles configuration
    definition files and a listener need to be defined.
    the listener will initialize JspTilesViewHandlerImpl with tiles definitions.
    -->
    <servlet>
    <servlet-name>TilesServet</servlet-name>
    <servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
    <init-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles-defs.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    </filter>
    </web-app>
    tiles-defs.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE tiles-definitions PUBLIC
    "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
    <tiles-definitions>
    <definition name="Base" path="/paginas/plantillaBasica.jsp">
    <put name="titulo" value="Base" type="string"/>
    <put name="cabecera" value="/cabecera.jsp" type="page"/>
    <put name="cuerpo" value="base" type="page"/>
    <put name="pie" value="base" type="page"/>
    </definition>
    <definition name="/busquedaDosCajas.tiles" extends="Base">
    <put name="titulo" value="Busqueda con dos cajas" type="string"/>
    <put name="cuerpo" value="/paginas/cuerpoDosCajas.jsp" type="page"/>
    </definition>
    </tiles-definitions>
    faces-config.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config>
    <application>
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>
    </application>
    <!-- El mantenimiento del bean proxy se delega al contenedor de spring-->
    <application>
    <variable-resolver>
    org.springframework.web.jsf.DelegatingVariableResolver
    </variable-resolver>
    </application>
    <!-- el unico idioma permitido es el espa�ol.-->
    <application>
    <locale-config>
    <default-locale>es</default-locale>
    </locale-config>
    </application>
    <!--
    - navigation rules
    -->
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>succesNoJS</from-outcome>
    <to-view-id>/paginas/listado.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>error</from-outcome>
    <to-view-id>error.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    index.jsp
    <%@ page session="false"%>
    <%
    response.sendRedirect("busquedaDosCajas.jsf");
    %>
    anybody could help me? i dont know whats happening
    regards a lot

    first make sure you are using Tiles stand-alone (in Struts Sandbox)
    add the follwoing servlet to your web.xml
    <servlet>
    <servlet-name>Tiles Servlet</servlet-name>
    <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    add the following context-param to your web.xml
    <context-param>
    <param-name>tiles-definitions</param-name>
    <param-value>/WEB-INF/tiles.xml</param-value>
    </context-param>
    add the following to your faces-config.xml
    <view-handler>org.apache.shale.tiles.TilesViewHandler</view-handler>
    add the following dependency to your pom.xml
    <dependency>
    <groupId>org.apache.shale</groupId>
    <artifactId>shale-tiles</artifactId>
    <version>1.0.3</version>
    </dependency>
    that should be it.
    Khaled

  • Shale with Tiles

    Hello,
    can someone help me to sort it out. I'm trying to get tiles working with shale.
    I've shale-blank (their example 1.0.4 version) working fine under tomcat 5.5, also I have tiles-test (example 2.0.3 version) working fine.
    Now I'm building on the top of shale-blank.
    In WEB.XML I added :
    <context-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles.xml</param-value>
    </context-param>
    <listener>
    <listener-class>
    org.apache.tiles.listener.TilesListener
    </listener-class>
    </listener>
    In FACES-CONFIG.xmlI added:
    <application>
    <view-handler>
    org.apache.shale.tiles.TilesViewHandler
    </view-handler>
    </application>
    In WEB-INF\lib I added:
    shale-tiles-1.0.4, tiles-core-2.0-r468346-SNAPSHOT
    Since I'm reading that shale needs tiles 2, I copied into welcome.jsp (right from tiles 2.0.3 example):
    <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
    and places into tiles.xml reference to tiles-config_2_0.dtd
    Got exception:
    javax.faces.FacesException: The absolute uri: http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml or the jar files deployed with this application
         org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:422)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
         org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java:176)
         org.apache.shale.view.faces.ViewViewHandler.renderView(ViewViewHandler.java:147)
         org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java:176)
         org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java:176)
         org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
         org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:47)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267)
    I tried then to change to struts tiles:
    (1)<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>
    (2) changing reference in tiles.xml to ...struts/dtds/tiles-config.dtd
    (3) and adding struts.jar to WEB-INF\lib.
    This time I've got:
    43: </p>
    44: <div id="level2">
    45: <f:subview id="content">
    46: <tiles:insert attribute="welc2" flush="false"/>
    47: </f:subview>
    48: </div>
    49:
    Stacktrace:
         org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:422)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
         org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java:176)
         org.apache.shale.view.faces.ViewViewHandler.renderView(ViewViewHandler.java:147)
         org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java:176)
         org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java:176)
         org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
         org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:47)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267
    Here is my WELCOME.jsp:
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%//@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>
    <f:view>
    <%@include file="messages.jspf"%>
    <html>
    <head>
    <title><h:outputText value="#{messages['welcome.title']}"/></title>
    <head>
    <body>
    <p>
    <h:outputText value="#{messages['welcome.prompt']}"/>
    <h:outputText value="#{welcome.timestamp}">
    <f:convertDateTime type="both"/>
    </h:outputText>
    </p>
    <div id="level2">
    <f:subview id="content">
    <tiles:insert attribute="welc2" flush="false"/>
    </f:subview>
    </div>
    </body>
    </html>
    </f:view>

    Hi,
    Got exception:
    javax.faces.FacesException: The absolute uri: http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml or the jar files deployed with this applicationTo solve above error u need to include tiles-jsp.jar in your project dependency. If you are using maven, you can give dependency in following way.
    <dependency>
    <groupId>org.apache.tiles</groupId>
    <artifactId>tiles-jsp</artifactId>
    <version>2.0.5</version>
    </dependency>

  • JSF,Tiles, Sun App Server and NetBeans 5.5

    hi all,
    here is my environment :
    1.Server - Sun Application Server (Running On Suse Linux OS)
    2.IDE - NetBeans 5.5
    3.Project - JSF with Tiles
    here i found topic about tiles and jsf :
    http://forum.java.sun.com/thread.jspa?threadID=643536&messageID=3792238 but i think that Tiles is best alternative for JSF Layout Manager (It's my mind).
    is there anybody help me how to integrate tiles with jsf ?
    here is my example :
    1.web.xml :
        <servlet>
            <servlet-name>Tiles Servlet</servlet-name>
            <servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
            <init-param>
                <param-name>definitions-config</param-name>
                <param-value>/WEB-INF/tiles-def.xml</param-value>
            </init-param>
            <load-on-startup>2</load-on-startup>
        </servlet>2. tiles-def.xml :
    <tiles-definitions>
             <!--****************************************************************-->
         <!--                     Global Layout                       -->
         <!--****************************************************************-->
         <definition name="global.layout" path="/pages/Mylayout/layout.jsp">
              <put name="title" value="Magti Billing System" type="string"></put>
                    <put name="subtitle" value="Magti Billing System" type="string"></put>
                    <put name="header" value="/pages/Mylayout/header.jsp"></put>
              <put name="subheader" value="/pages/Mylayout/sub_header.jsp"></put>          
              <put name="footer" value="/pages/Mylayout/footer.jsp"></put>
                    <put name="body" value="/pages/Mylayout/body.jsp"></put>
                    <put name="left_menu" value="/pages/Mylayout/left_menu.jsp"></put>
         </definition>   
    </tiles-definitions>3.and then i have 5 blank jsp pages : body.jps, footer.jsp, header.jsp, layout.jsp, left_menu.jsp, sub_header.jsp.
    4. here is my layout.jsp code :
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:jsp="http://java.sun.com/JSP/Page"
              xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
              xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles"
    >
        <tiles:importAttribute scope="request"></tiles:importAttribute>
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <webuijsf:page binding="#{pages$Mylayout$layout.page1}" id="page1">
                <webuijsf:html binding="#{pages$Mylayout$layout.html1}" id="html1">
                    <webuijsf:head binding="#{pages$Mylayout$layout.head1}" id="head1">
                        <webuijsf:link binding="#{pages$Mylayout$layout.link1}" id="link1" url="/resources/stylesheet.css"/>
                    </webuijsf:head>
                    <webuijsf:body binding="#{pages$Mylayout$layout.body1}" id="body1" style="-rave-layout: grid">
                        <webuijsf:form binding="#{pages$Mylayout$layout.form1}" id="form1">
                            <h:panelGrid columns="2" cellspacing="0" cellpadding="0"
                                         border="0" styleClass="maingrid" columnClasses="maingrid">
                                <f:facet name="header">
                                    <f:subview id="header">
                                        <h:panelGrid columns="1" cellpadding="0" cellspacing="0">
                                            <tiles:insert attribute="header" flush="false" />
                                            <tiles:insert attribute="subheader" flush="false" />
                                        </h:panelGrid>
                                    </f:subview>
                                </f:facet>
                                <f:subview id="left_menu">
                                    <tiles:insert attribute="left_menu" flush="false" />
                                </f:subview>
                                <f:subview id="body">
                                    <tiles:insert attribute="body" flush="false" />
                                </f:subview>
                                <!--
                                <f:facet name="footer">
                                    <f:subview id="footer">
                                        <tiles:insert attribute="footer" flush="false" />
                                    </f:subview>
                                </f:facet>
                                -->
                            </h:panelGrid>
                        </webuijsf:form>
                    </webuijsf:body>
                </webuijsf:html>
            </webuijsf:page>
        </f:view>
    </jsp:root>5. and at last i have index.jsp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
    xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles"
    >
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <webuijsf:page binding="#{pages$main$index.page1}" id="page1">
                <webuijsf:html binding="#{pages$main$index.html1}" id="html1">
                    <webuijsf:head binding="#{pages$main$index.head1}" id="head1">
                        <webuijsf:link binding="#{pages$main$index.link1}" id="link1" url="/resources/stylesheet.css"/>
                    </webuijsf:head>
                    <webuijsf:body binding="#{pages$main$index.body1}" id="body1" style="-rave-layout: grid">
                        <webuijsf:form binding="#{pages$main$index.form1}" id="form1">
                            <tiles:insert definition="global.layout" flush="false"/>
                        </webuijsf:form>
                    </webuijsf:body>
                </webuijsf:html>
            </webuijsf:page>
        </f:view>
    </jsp:root>but i get an error like this :
    Can't leverage base class
    java.lang.IllegalStateException
            at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:259)
            at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:219)
            at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:458)
            at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:643)
            at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1070)
            at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:180)
            at org.apache.jsp.pages.Mylayout.layout_jsp._jspx_meth_f_view_0(layout_jsp.java:140)
            at org.apache.jsp.pages.Mylayout.layout_jsp._jspService(layout_jsp.java:99)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:412)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:318)Any Ideas Is Usefull. Thanks.
    Paata.

    Hi,
    I'm trying to use Tiles with NetBeans 6.0. I used a similar set up as the other writer did, except for the JSP:root part:
    <jsp:root version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
    xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles">
    It complies and deploys OK, except it renders a blank page. The source code of the page is below. It seems that the "tiles:insertDefinition" was not expanded. Would you share some lights on how you get it to work. By the way I did not use shale-tiles, do I need it?
    Thanks in advance.
    <!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:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#" xmlns:waistate="http://www.w3.org/2005/07/aaa">
    <head>
    <meta content="no-cache" http-equiv="Pragma" />
    <meta content="no-cache" http-equiv="Cache-Control" />
    <meta content="no-store" http-equiv="Cache-Control" />
    <meta content="max-age=0" http-equiv="Cache-Control" />
    <meta content="1" http-equiv="Expires" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="/apogee-web-1.0-SNAPSHOT/theme/com/sun/webui/jsf/suntheme/css/css_master.css" />
    <script type="text/javascript">
    var djConfig = {
        "isDebug": false,
        "parseWidgets": false,
        "debugAtAllCosts": false
    </script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/dojo/dojo.js"></script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/json/json.js"></script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/prototype/prototype.js"></script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/com_sun_faces_ajax.js"></script>
    <script type="text/javascript">
    dojo.hostenv.setModulePrefix("webui.suntheme", "/apogee-web-1.0-SNAPSHOT/theme/com/sun/webui/jsf/suntheme/javascript");
    dojo.require('webui.suntheme.*');
    dojo.require('webui.suntheme.widget.*');
    dojo.require('webui.suntheme.widget.jsfx.*');
    </script>
    <link id="link1" rel="stylesheet" type="text/css" href="/apogee-web-1.0-SNAPSHOT/resources/stylesheet.css" />
    </head>
    <body id="body1" style="-rave-layout: grid" onload="" onunload="">
    <form id="form1" class="form" method="post" action="/apogee-web-1.0-SNAPSHOT/faces/Apogee.jsp" enctype="application/x-www-form-urlencoded">
    <tiles:insertDefinition flush="false" name="global.layout" />
    <input id="form1_hidden" name="form1_hidden" value="form1_hidden" type="hidden" />
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4sIAAAAAAAAAKVWTWwbRRR+Xmexm4LSOCgEiZRIFESFsk7bCyIUSFInsfBPZZsU2kM6Xk/sDevdYXbWXreiag+ABBcQIIEUBBIcemhP3HoAqh4QSEUiEhdOFReEBBwQEj8HYGZs79qOZZNkZD2vd957M98333vja7+A6lKYOJfaRDWkmcgqa9niJtbZ/JvfPP/hIeeoqQB4BAAiDoUTul3VHNfSNpCOHQ0RYho6YoZtaXmGGE4jC5UxTVaJeaRAMc7YJfz7xo3Prs+tfH63yFM/A2KsdOfBHsOWw7PwlDXEENX4PLEtbDFHO40oM5BZoKiGqYPMNQPXc7bNxCIQ3Vw3Svxz3HNegkug1Gdl/pl2/jouuoa26WwEGXnCMgaVcHusMyo0OGqVVU1QK9x2RSlDojAq8Shuu6LCg6NShvUiqCa3u1lr0S41QC1y2xWlDo5atmkV1A1uj3muiBJD8Z+iwRM//3GpEpcZpraKnEoaETXy/c1bk+e/DYOyDKOmjUrLSGc2TcIBVqHYqdhmySNPPyNT3FWPikSCAAZHRC6vpQC+My4mbem5XC6RKayvJRNn1nPZbEEsPsbg0TYCIQLhrHEcPKCIHKwt5RILhcQpGeTvUSp50bZNjKzbM/Tyd1t//6pA6CyoNWS62CMhBjP9dpBNn85mxB6Sp/I820SAeIFS1EgZDvOubE+//yX6IAyhJIw4xgUsCyRUHxHSY21teYSwQKACSUweyziIidHVQjq1vriQTy4xOBhfIHYZY342hC96KFg0ZevIxJf+HD+/NffXzwqMJCFa4dTrvLJSENFt12K0wSAmCzguYMfzjBpWeT4FUfHT5ZsRyz7A3WuIGshi8qdH/uWDATBQsCVeHe5mL2kxzIs59sNHn/xx5bXHFYG2xV57i9Iv41aLmL567d3pg+/ceaPdLkKEEF87oT7KUjuUJZ7u2SGSkHg9ISfv7eK3WYWdcu1pYS0Grm+v/fjT9MUVf08MIkXDKvG5YGsc9COdQghKQ7a0VS5gTPOi+bzw9acn3966nVZAScEB3USOk0HVNrmjDvcpyRgGk83jMOx4HnPKTeMCKpp4nkuCL3e4rWZsamuCz4RHeKmIBiiaWvjG1eKDD3/1nmiYFKaae9vpWh+9fO7OF/+8pUi3Cd8t8Pj4ldfzv53dflLCr5+AsYcutmQmBfry8DZJiCfQTfomJswUx7czUvrL6R4zUAXh3apACVQguiprd7ze5vVYO3S246jFU5zIr+NdhEhFDSFE3AAtQo76ZgAhTX/SB3TwNLb3ImheD/uELSgcBpv7tGCf9M0g2MI/OH1CAv9u0+/d/1BMJKCsl9vdgZcEDgEvbuIW+Gd9MwB805+IBn9/nJeh7VLeU+IOa5j8LsSYabrjBNuGPvju27skmrf4/iQhq2kIK+KfRouVp3wzgJWmf8/gd9asuM5nTdSwXfbETJkapZ4GEhsuh6m90yWu5rl90iUpH0KX+IvVokv3zQC6pH9nBe0YfUoF/gMrokC8ywsAAA==" />
    </form>
    <script type="text/javascript">
    webui.suntheme.common.body = new webui.suntheme.body('/Apogee.jsp', '/apogee-web-1.0-SNAPSHOT/faces/Apogee.jsp',null,null,'com_sun_webui_util_FocusManager_focusElementId');</script>
    </body>
    </html>

  • Current status of Tiles and JSF integration

    Hi. I am new to JSF, and I have been researching Tiles integration with JSF. I've read a lot of posts about difficulties encountered when integrating them, and other posts seem to suggest that it is definitely do-able (some posts say using Shale Tiles is the way to go instead of using Struts tiles.)
    I have not found any definitive or straight forward tutorial on integrating Tiles and JSF. Is it a matter of the JSF technology not being fully developed? Will tiles be easily integrated (as it is in Struts) in the future, without jumping through hoops?
    Any opinions or advice would be greatly appreciated. I would rather not use JSF w/ JSP includes as an alternative. It seems as though Struts would be a better choice for what I have to do, unless I can integrate JSF and tiles functionality with relative ease.
    Thanks.

    Cold-Gin wrote:
    I have not found any definitive or straight forward tutorial on integrating Tiles and JSF. Is it a matter of the JSF technology not being fully developed? Will tiles be easily integrated (as it is in Struts) in the future, without jumping through hoops?I certainly wouldn't say that JSF technology is not fully developed by any stretch. It's certainly possible that there's some sort of impedance mismatch between the two, but Tiles support is hardly the measure of a framework's maturity. :P
    Having said that, I really can't say much more than that with regard to Tiles. What I can suggest, though, is JSFTemplating or Facelets. Both are mature products, engineered specifically for use with JSF. Facelets is probably the more popular of the two and is slated for inclusion in JSF 2.0 in some form, while JSFTemplating, which supports the Facelets syntax, is another strong alternative (which, incidentally, is what powers the GlassFish admin GUI).
    Hope that helps...

  • Jsf-tiles example

    I want to insert a menu page in my actula jsp,
    I'm having the following code, this is not working and giving Exception nuul, I'm not able to find what is the problem, did any one had this kind of problem, can some one help.
    Error I'm getting is, Exception in:null] null
    ===============================loginPage.jsp=====================
    <!doctype html public "-//w3c//dtd html 4.01 transitional//en">
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
    <tiles:importAttribute scope="request"/>
    <f:view>
    <div class="bfrm" style="width: 72%;" >
    <div id="location"></div>
    <div style="height: 425px" class="cv_c">
    <h:form id="HomePage">
    <h:panelGrid columns="1">
    <h:dataTable>
    <h:column>
    <f:facet name="header">
    <td> <h:outputFormat style="width: 720px;" value="Receiving Schedules"/></td>
    </f:facet>
    </h:column>
    </h:dataTable>
    </h:panelGrid>
    <h:panelGrid columns="2">
    <h:panelGrid>
    <h:dataTable>
    <td><img src="/images/collage.jpg" align="left" height="400" width="567"></td>
    </h:dataTable>
    </h:panelGrid>
    <h:panelGrid>
    <td>
    <f:facet name="loginmenu">
    <f:subview id="loginmenu">
    <tiles:insert definition="lMenu" attribute="menu" flush="false"/>
    </f:subview>
    </f:facet>
    </td>
    </h:panelGrid>
    </h:panelGrid>
    </h:form>
    </div>
    </div>
    </f:view>
    =====================menu.jsp==================
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <h:dataTable>
    <h:column>
    <h:outputText id="menuName" value="Test"/>
    </h:column>
    </h:dataTable>
    ======================tiles-defs.xml ======================
    <definition name=".loginPage" extends=".mainLayout">
    <put name="content" type="page"
    value="/WEB-INF/pages/loginPage.jsp"/>
    </definition>
    <definition name="lMenu">
    <put name="menu" value="/WEB-INF/layout/menu.jsp"/>
    </definition>
    ========================================================

    have been having trouble trying to get Suns JSF working with struts-tiles. It seem I don't know how to link to it in the face-config.xml like you would normally do in struts-config.xml. Can you email your code, exspecially the xml files, so I can how it is wired up.
    Thanks!
    [email protected]

  • JSF/Tiles/Spring Integration Problem

    Hi,
    I have a JSF based web application, which uses Struts Tiles framework through the view-handler "org.apache.myfaces.tomahawk.application.jsp.JspTi lesViewHandlerImpl". Now I am trying to integrate this with the Spring framework by making use of the variable-resolver "org.springframework.web.jsf.DelegatingVariableRes olver". With this, when I try to access a page, (whose backing bean gets injected with Spring beans) I get the following exception:
    javax.faces.el.EvaluationException: Expression Error: Named Object: 'userSession' not found.
    at com.sun.faces.config.ManagedBeanFactory.getScopeFo rSingleExpression(ManagedBeanFactory.java:998)
    at com.sun.faces.config.ManagedBeanFactory.hasValidLi fespan(ManagedBeanFactory.java:931)
    at com.sun.faces.config.ManagedBeanFactory.evaluateVa lueBindingGet(ManagedBeanFactory.java:892)
    at com.sun.faces.config.ManagedBeanFactory.setPropert iesIntoBean(ManagedBeanFactory.java:553)
    at com.sun.faces.config.ManagedBeanFactory.newInstanc e(ManagedBeanFactory.java:234)
    at com.sun.faces.application.ApplicationAssociate.cre ateAndMaybeStoreManagedBeans(ApplicationAssociate. java:253)
    at com.sun.faces.el.VariableResolverImpl.resolveVaria ble(VariableResolverImpl.java:79)
    at org.springframework.web.jsf.DelegatingVariableReso lver.resolveVariable(DelegatingVariableResolver.ja va:108)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedVal ue.java:125)
    at com.sun.faces.el.impl.ComplexValue.evaluate(Comple xValue.java:146)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.eval uate(ExpressionEvaluatorImpl.java:244)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:173)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:154)
    at javax.faces.component.UIOutput.getValue(UIOutput.j ava:147)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputR enderer.getValue(HtmlBasicInputRenderer.java:82)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.getCurrentValue(HtmlBasicRenderer.java:191)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeEnd(HtmlBasicRenderer.java:169)
    at javax.faces.component.UIComponentBase.encodeEnd(UI ComponentBase.java:712)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:443)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:440)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at javax.faces.webapp.UIComponentTag.encodeChildren(U IComponentTag.java:600)
    at javax.faces.webapp.UIComponentTag.doEndTag(UICompo nentTag.java:537)
    at com.sun.faces.taglib.html_basic.PanelGridTag.doEnd Tag(PanelGridTag.java:460)
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_h_panelGrid_0(jsf_002dlayout_jsp.jav a:269)
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_h_form_0(jsf_002dlayout_jsp.java:222 )
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_f_view_0(jsf_002dlayout_jsp.java:188 )
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspService(jsf_002dlayout_jsp.java:99)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    I could get the application work with JSF and Spring, without Tiles.
    Appreciate any help in this regard.
    Thanks

    I'm assuming that since you are using JSF and Tiles, you are not using Spring's web framework. In that case, the integration of Spring with JSF is relatively trivial and you can neglect it for now. You might want to try the link below, if you are feeling lucky:
    http://www.google.com/search?q=myfaces+tiles

  • Blank Page with JSF 1.1.01 RI and Tiles

    My web pages have been rendered without any problem using JSF 1.1 and Tiles with Weblogic 8.1 SP3. But it can't handle multiple forms within a page. So I upgraded JSF to version 1.1.01 RI. I only get blank pages since the upgrade.
    Does anybody have the same problem? Any help is appreciated.

    I have the same problem with Tomcat 5.5 and tried both 1.1.01 and 1.1.02. I used both JSF RI 1.0 and 1.1 with no problem on JSF with tiles, but because of the known bugs in 1.1 I had to use 1.1.01 or later which doesn't work nicely with tiles. Does anyone know how to fix this in Tomcat?

  • Ejb3 app functions only when both .jsf and .jsp is present

    Hi All,
    I have the following problem: when I try to remove either of booking.jsp and booking.jsf (having same contents) from the directory tree of app.war (following), I get the message HTTP status 404 The requested resource (/s_ejb3_jb421_tobbfele/pages/booking.jsp) is not available.
    Thank you in advance: Balazs Bamer
    JBoss 4.2.1 output:
    16:23:21,101 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
    16:23:21,101 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
    16:23:21,101 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false
    16:23:21,101 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value false
    16:23:21,101 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value org.apache.myfaces.renderkit.html.util.DefaultAddResource
    16:23:21,101 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value org.apache.myfaces.renderkit.html.util.DefaultAddResource
    16:23:21,121 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value true
    app.war (inside s_ejb3_jb421_tobbfele.ear) contents, with only the booking.jsf:
    META-INF/
    META-INF/MANIFEST.MF
    WEB-INF/
    WEB-INF/web.xml
    WEB-INF/lib/
    WEB-INF/lib/com-sun-rave-designtime.jar
    WEB-INF/lib/commons-beanutils.jar
    WEB-INF/lib/commons-chain.jar
    WEB-INF/lib/commons-codec.jar
    WEB-INF/lib/commons-collections.jar
    WEB-INF/lib/commons-digester.jar
    WEB-INF/lib/commons-el.jar
    WEB-INF/lib/commons-fileupload.jar
    WEB-INF/lib/commons-lang.jar
    WEB-INF/lib/commons-logging.jar
    WEB-INF/lib/commons-validator.jar
    WEB-INF/lib/jakarta-oro.jar
    WEB-INF/lib/jsfcl-dt.jar
    WEB-INF/lib/jsfcl.jar
    WEB-INF/lib/jstl-api.jar
    WEB-INF/lib/jstl-impl.jar
    WEB-INF/lib/openide.jar
    WEB-INF/lib/propertyeditors.jar
    WEB-INF/lib/shale-clay.jar
    WEB-INF/lib/shale-core.jar
    WEB-INF/lib/shale-remoting.jar
    WEB-INF/lib/shale-tiger.jar
    WEB-INF/lib/shale-tiles.jar
    WEB-INF/lib/shale-view-1.0.4.jar
    WEB-INF/lib/tiles-core.jar
    WEB-INF/lib/tomahawk-1.1.2-SNAPSHOT.jar
    WEB-INF/classes/
    WEB-INF/classes/com/
    WEB-INF/classes/com/loxon/
    WEB-INF/classes/com/loxon/shaleproba/
    WEB-INF/classes/com/loxon/shaleproba/FlightServlet.class
    booking_messages.properties
    booking_messages_en.properties
    booking_messages_es.properties
    booking_messages_fr.properties
    images/
    pages/
    theme/
    index.html
    pages/booking.jsf
    theme/style.css
    WEB-INF/faces-config.xml
    index.html:
    <html>
    <head>
      <meta http-equiv="Refresh" content="0; URL=pages/booking.jsf">
    </head>
    </html>faces-config.xml:
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
            <managed-bean>
                    <managed-bean-name>flightServlet</managed-bean-name>
                    <managed-bean-class>com.loxon.shaleproba.FlightServlet</managed-bean-class>
                    <managed-bean-scope>request</managed-bean-scope>
            </managed-bean>
    </faces-config>web.xml:
    <?xml version="1.0"?>
    <web-app   xmlns="http://java.sun.com/xml/ns/j2ee"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                                  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
                          version="2.4">
        <description>debug web.xml</description>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
            <description>
                State saving method: "client" or "server" (= default)
                See JSF Specification 2.5.2
            </description>
        </context-param>
        <context-param>
            <param-name>javax.faces.ALLOW_JAVASCRIPT</param-name>
            <param-value>true</param-value>
            <description>
                This parameter tells MyFaces if javascript code should be allowed in the
            </description>
        </context-param>
        <context-param>
            <param-name>javax.faces.DETECT_JAVASCRIPT</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.PRETTY_HTML</param-name>
            <param-value>true</param-value>
            <description>
                If true, rendered HTML code will be formatted, so that it is "human readable".
                i.e. additional line separators and whitespace will be written, that do not
                influence the HTML code.
                Default: "true"
            </description>
        </context-param>
        <context-param>
            <param-name>javax.faces.AUTO_SCROLL</param-name>
            <param-value>true</param-value>
            <description>
                If true, a javascript function will be rendered that is able to restore the
                former vertical scroll on every request. Convenient feature if you have pages
                with long lists and you do not want the browser page to always jump to the top
                if you trigger a link or button action that stays on the same page.
                Default: "false"
            </description>
        </context-param>
        <filter>
            <filter-name>extensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
            <init-param>
                <param-name>maxFileSize</param-name>
                <param-value>20m</param-value>
                <description>Set the size limit for uploaded files.
                    Format: 10 - 10 bytes
                            10k - 10 KB
                            10m - 10 MB
                            1g - 1 GB
                </description>
            </init-param>
            <init-param>
                <param-name>uploadThresholdSize</param-name>
                <param-value>100k</param-value>
                <description>Set the threshold size - files
                        below this limit are stored in memory, files above
                        this limit are stored on disk.
                    Format: 10 - 10 bytes
                            10k - 10 KB
                            10m - 10 MB
                            1g - 1 GB
                </description>
            </init-param>
        </filter>
        <filter-mapping>
            <filter-name>extensionsFilter</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
        </filter-mapping>
        <filter-mapping>
            <filter-name>extensionsFilter</filter-name>
            <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
         </filter-mapping>
      <filter>
        <filter-name>shale</filter-name>
        <filter-class>
          org.apache.shale.faces.ShaleApplicationFilter
        </filter-class>
      </filter>
      <filter-mapping>
        <filter-name>shale</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
      </filter-mapping>
        <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>*.jsf</url-pattern>
        </servlet-mapping>
        <welcome-file-list>
            <welcome-file>index.html</welcome-file>
        </welcome-file-list>
    </web-app>booking.jsf:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://struts.apache.org/shale/core" prefix="s" %>
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
    <html>
    <head>
      <title>Metro Systems </title>
      <link href="../theme/style.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="container">
    <f:loadBundle basename="booking_messages" var="booking_messages"/>
      <f:view>
          <h3> <h:outputText value="#{booking_messages['welcome']}"/>  </h3>
       <h:form onsubmit="return validateForm(this);">
         <table align="center" cellpadding="5" cellspacing="5">
           <tr>
             <td>Email</td>
             <td><h:inputText id="email" value="#{flightServlet.flight.email}">
                        <s:commonsValidator type="required"
                              arg="Email"
                              server="true"
                              client="true"/>
                        <s:commonsValidator type="email"
                                 arg="#{flightServlet.flight.email}"
                              server="true"
                              client="true"/>
                 </h:inputText>
             </td>
           </tr>
           <tr>
             <td><h:outputText id="departure" value="#{booking_messages['date']}"/></td>
             <td>
                <t:inputCalendar monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
                    currentDayCellClass="currentDayCell" value="#{flightServlet.flight.departure}" renderAsPopup="true"
                    popupTodayString="#{booking_messages['popup_today_string']}" popupWeekString="#{booking_messages['popup_week_string']}">
                        <s:commonsValidator type="required"
                              arg="Departure date"
                              server="true"
                              client="true"/>
                 </t:inputCalendar>
            </td>
           </tr>
           <tr>
             <td><h:outputText value="#{booking_messages['city']}"/> </td>
             <td> <h:selectOneMenu value="#{flightServlet.flight.city}" required="true">
                                 <f:selectItem itemLabel="Los Angeles" itemValue="Los Angeles"/>
                                 <f:selectItem itemLabel="Madrid" itemValue="Madrid"/>
                                 <f:selectItem itemLabel="Mexico City" itemValue="Mexico City"/>
                                 <f:selectItem itemLabel="New York" itemValue="New York"/>
                                 <f:selectItem itemLabel="Paris" itemValue="Paris"/>
                </h:selectOneMenu></td>
           </tr>
         </table>
         <h:message for="email" styleClass="errors"/>
         <h:message for="departure" styleClass="errors"/>
         <s:validatorScript functionName="validateForm"/>
         <h:commandButton type="submit" value="#{booking_messages['reserve']}" action="#{flightServlet.reserve}"/>
        <h:messages/>
      </h:form>
      </f:view>
        </div>
    </body>
    </html>ear application.xml:
    <application>
      <display-name>JSF Shale EJB3 JBoss 4.2.1</display-name>
      <module>
        <web>
          <web-uri>app.war</web-uri>
          <context-root>/s_ejb3_jb421_tobbfele</context-root>
        </web>
      </module>
      <module>
        <ejb>app.jar</ejb>
      </module>
    </application>ear jboss-ap.xml:
    <jboss-app>
      <loader-repository>
        s_ejb3_jb421_tobbfele:archive=s_ejb3_jb421_tobbfele.ear
      </loader-repository>
    </jboss-app>

    <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>tells JSF, that it will get accessed via urls which end in jsf. So it's just a logical name
    e.g. index.jsf
    <context-param>
         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
         <param-value>.jsp</param-value>
    </context-param>Tells JSF that the content filename will end in .jsp
    Default is jsp anyway, so this param is optional.
    Edit:
    http://www.exadel.com/tutorial/jsf/jsftutorial-kickstart.html
    Chapter "Creating the index.jsp File" might help you with the question about processing "jsp only" pages
    Edited by: dube on Oct 26, 2007 2:11 AM

Maybe you are looking for

  • Cracking and popping over FireWire

    Audio or videos files played back with QuickTime over my FireWire connection are accompanied by quite a bit of cracking and popping. The crackling is not heard during quiet portions of the file. The format of the file doesn't seem to matter (.mov, .w

  • MobileMe data correct - want to sync to iCal

    Hi All, I'm having real problems on what seems like a fundamental requirement. I have setup MobileME and this is great, all my contacts are there and this syncs seamlessly with my iPhone - both ways. However, I have a iMac 24 and a MacBook Pro - I ca

  • I just installed iOS5 on my Ipod Touch and there is  a gray bubble when I try to choose an album or song, how do I get by this to make my choice?

    I just installed iOS5 on my Ipod Touch and there is  a gray bubble when I try to choose an album or song, how do I get by this to make my choice or how do I use the bubble?

  • Logical column?

    Hi everybody, I have the fact table in the rpd. Every row represents one employee. There are columns such as full time (contract), part time (contract), age, salary and so on. My problems is counting number of part-time employee, full-time employee e

  • Getting the Sunday dates using Next_Day

    The requirement is: Get the Sunday of this week and Sunday of the last week. As system date is 02-July, this Sunday is 01-July and last week Sunday is 24-Jun. If say suppose the system date is 01-July, then this Sunday should be 24-Jun and last Sunda