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.

Similar Messages

  • 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.

  • 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-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 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 2.0 Beta1, simple example, doesn't work, why?

    I made a simple JSF 2.0 NetBeans (Web Application project) example. Only imported library jars are jsf-api.jar and jsf-impl.jar from mojarra-2.0.0-Beta1 release.
    These are files which I added:
    web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <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>*.xhtml</url-pattern>
        </servlet-mapping>
    </web-app>
    test.xhtml (example from DZone JSF 2.0 RefCard):
    <html xmlns="http://www.w3.org/1999/xhtml"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:ui="http://java.sun.com/jsf/facelets">
         <h:head></h:head>
         <h:body>
              <h:form>
                   <h:outputText value="test" />
              </h:form>
         </h:body>
    </html>And that's it. There is no faces-config.xml, as it is not needed. There are no managed beans. JSF and Facelets plugins are disabled.
    When I try to deploy, a get an exception:
    SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    java.lang.NoClassDefFoundError: com/sun/facelets/tag/jsf/ComponentHandler
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1850)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         at com.sun.faces.util.Util.loadClass(Util.java:200)
         at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:308)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processComponent(FaceletTaglibConfigProcessor.java:523)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:358)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:311)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:260)
         at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:312)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:210)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: java.lang.ClassNotFoundException: com.sun.facelets.tag.jsf.ComponentHandler
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 39 moreI tried NetBeans versions: 6.5.1, 6.7-RC3 and 200906261401 Build. Tried with latest Apache-Tomcat and JBoss. It's all the same.
    What is the problem? Why it seeks for a facelets com.sun.faces.config.ConfigureListener, from conventional standalone facelets library? Shouldn't it use facelets classes from JSF 2.0 library?
    I tried to add facelets-1.1.15.B1 jar into project, just to see what happens, and the same exception is thrown ...
    Please help!

    It's because somewhere on your classpath there is a facelet-taglib.xml that's referencing Facelet 1.1.x classes which aren't present.

  • 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.

  • Struts-faces library: provided struts/tiles example doesn't work?!

    Dear all,
    I�ve been trying to migrate my struts-tiles application to JavaServer Faces using the struts-faces library. I downloaded the latest nightly build, but I was unable to deploy and run the second example (the one using tiles) on Tomcat 5.0.28.
         At first, the <h:commandLink> components for the �Register� and �Login� links on the first page (loggedoff.jsp) wouldn�t work, probably because they should have been replaced by <s:commandLink>. So I fixed that, but then I get an inexplicable http 404 error: �Invalid path /layout was requested� when I click on any of the two links.
         Looking at the source code of both JSP and HTML I noticed that the JSP element <s:form action="/editRegistration"> translates to <form id="menu:_id5" name="registrationForm" action="/StrutsFacesExample/layout.do" method="post">. The action element is obviously(?) wrong: there is no layout.do action mapping anywhere, it�s the path pointing to the main layout jsp with the suffix replaced!
    I�ve been able to trace the problem down to method �action� in library class org.apache.struts.faces.renderer.FormRenderer, which does the following:
    protected String action(FacesContext context, UIComponent component) {
    String actionURL =
    context.getApplication().getViewHandler().
    getActionURL(context, context.getViewRoot().getViewId());
    if (log.isTraceEnabled()) {
    log.trace("getActionURL(" + context.getViewRoot().getViewId() +
    ") --> " + actionURL);
    return (context.getExternalContext().encodeActionURL(actionURL));
    Any ideas on what could be going wrong here? I also tried deploying the example on Tomcat 5.5.7 and JBoss 3.2.5, but the behavior was the same.
    Any comments would be greatly appreciated!
    Mario

    Did you ever find a solution to this problem? No, unfortunately I am still looking for a solution to this one.
    I� ve also reported this to Bugzilla (http://issues.apache.org/bugzilla/show_bug.cgi?id=35265) so you might want to keep an eye on the issue, in case something comes up. However there appears to be no significant activity in the library�s source code repository for almost a month.
    After reading other discussions in forums like this one, I must say that I am discouraged: I seriously doubt if anyone has successfully managed to use the struts-faces integration library. A lot of people are suggesting that integrating the two frameworks is not worth the trouble, and so I am now in the process of evaluating the cost of complete migration from struts to jsf (btw, it doesn�t look good�). Nevertheless, some recent articles demonstrate the library�s use (the most recent one is Kito Mann�s http://www.jsfcentral.com/reading/#4030 ) so I might be wrong.
    It would be nice though if someone who has managed to integrate the two technologies successfully would share his views on this forum�
    Mario

  • Webutil_host.blocking( ) example needed  * SOLVED *

    Hello, I need to get the name of the UNIX application server from my forms 10g program. I'm calling pid := webutil_host.blocking('uname -n') but it fails with a return code of 2 no matter how I format the command ('ksh -c "uname -n"', etc). subsequent calls to outp := webutil_host.get_standard_output(pid) or outp := webutil_host.get_standard_error(pid) don't seem to work either as trying to display outp(0), etc display nothing.
    webutil functionality is not being called in pre-form or when-new-form-instance (before webutil is instantiated).
    Can anyone point me to a working example of getting output from a UNIX command?
    Thanks,
    Gary

    Ok, here's how I did it, turned out to be pretty simple:
    FUNCTION get_oas_name RETURN varchar2 IS
      fp text_io.file_type;
      output varchar2(30);
    BEGIN
      host('/bin/uname -n > /tmp/oasname');
      fp := text_io.fopen('/tmp/oasname','r');
      text_io.get_line(fp, output);
      text_io.fclose(fp);
      return output;
    END;Gary

  • Script for moving multiple subtitle clips in the works - EXAMPLES NEEDED!

    Hi everyone!
    One severe deficiency of DVD Studio Pro is the inability to move multiple subtitle clips back or forward in a track by an arbitrary offset.
    I ran into this problem while I was creating a DVD from an EyeTV recording of a DVB broadcast, the subtitles from which have to be extracted to a SON file and a bunch of .bmp images with a separate piece of software, ProjectX. For some reason, ProjectX messed up the subtitle timecodes, so I had to move the entire track forward by a fixed amount. Unable to do this inside DSP, and unable to find tools that would do this for SON files, I set out to code my own tool with Python.
    Currently, I have a very simplistic working version of the script, which I successfully used to shift the timecodes of the aforementioned SON file.
    This got me thinking: I can't be the only one who has faced this problem. So, in the spirit of giving something back to the community, I thought I'd try my hand at turning this little script into a versatile tool for timescaling several different subtitle formats.
    If possible, I would like to receive real-life examples of several different plaintext (no binary formats, thanks) subtitle formats from you guys, both those that DSP supports and those that it doesn't.
    For now the tool only shifts entire tracks and works on the command line, but who knows, maybe I'll create a GUI at some point and add the ability to shift specific subtitle clips instead of whole tracks - time permitting, of course.
    If you think you might have some juicy subtitles laying around, please reply or contact me directly by e-mail: elamaton (at) nic.fi. Don't worry, I won't redistribute anything you send me, it will only be used as test data.
    iMac Core Duo 20"   Mac OS X (10.4.7)  

    Sounds like a very good idea... but have you seen Subtitler:
    http://www.versiontracker.com/dyn/moreinfo/macosx/26322
    Not to say you won't make a better version, and I'd be delighted if you did! Manipulating subs in DVDSP is not something I do any more - I use an external text editor for any job where more than a few subs are needed.
    The problem in DVDSP is that you cannot extract the subs directly, you have to export an track item description which has the subs and time code buried within the XML. You might find that PHP will give you a web based tool to extract the subs and time codes and write a text file, which you can then manipulate.
    In fact, wouldn't a web based tool be a good idea? People could upload the track description, it would export the subs and you could get it to adjust the timecodes and write a text file back in the correct format to import back in to DVDSP. Once the subs are in a text file it is a simple matter to manipulate them further...

  • Step by step example needed.

    To generate documentation for all classes of project laing in the specified dir.

    More detail is needed. -- which version of Javadoc are you using? Where are the package names (do they all start at the same top-level package)? Generic examples are given at:
    http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/javadoc.html#examples
    -Doug

  • I want to use maps in jsf?its not working help needed

    Hi
    i am trying to use map and area in jsf. i added the tablib demo/coponenets but it says <d:map> is unknown tag
    do i need to add any jar file for making it work
    please guide me
    thanks in advance.

    See [[/questions/923988]]

  • 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/ADF Faces - ADF-BC example/howto?

    Hi,
    Background:
    ==========
    I know that ADF-BC databinding is not included in the JDev 10.1.3 preview.
    I read and searched nearly all howto's, examples, blogs on ADF-Faces available on the net.
    For the past months I learned how to use the ADF-BC with JClient.
    This convinced me to use the ADF-BC and it's binding features (a fantastic framework!!!!) for my model layer.
    I'm developping a web application.
    Most of the examples on ADF-Faces/JSF are on the View Layer.
    My question:
    ===========
    I read somewhere that JDev 10.1.3 production with drag and drop of ADF-BC databinding will be available only in the summer.
    Question 1:
    ==========
    I suppose that meanwhile it is still possible to use the ADF-BC as the model layer for JSF or ADF-Faces, but the databinding must be done manually, is this correct?
    Question 2:
    ==========
    If answer to 1) is yes.
    Where can I find a howto/best practice document that explains how to use ADF-BC with JSF/ADF-Faces in the backing beans?
    My purpose is to develop my code so that it will be "standard" / "compatible" with the production version of JDev 10.1.3.
    I prefer to use the de-facto JSF standard and code the bindings manualy instead of using Struts with available drag'n drop ADF-BC databinding.
    Your advice will be apreciated
    Frederic

    There is no such document for (1) because we are in the process of delivering design time support for ADF BC integration with ADF Faces, as you mentioned.
    Therefore, you could either continue with ADF UIX, ADFm, ADF BC for the time being, or else try out ADF Faces with session scope Managed Beans. In either case, you'll want to convert this later on, when JDev 10.1.3 completes its support for ADF Faces / ADF BC drag-and-drop integration.
    Kind Regards.

Maybe you are looking for

  • Can not store data to append structure in mara

    Hi after make the following steps, I have problem, please give me some tips. thanks 1, Append structure Zcode in MARA. 2, Created a ZMGD1 via SE80 copy from function group MGD1. 3, modify screen 0001, put this Zcode in this screen and FC MARA-Zcode.

  • Regarding Creation of Invoice Verification Document Using Idoc

    Hi All, I am using Idoc INVOICE01 which is getting triggered from one SAP system after Invoice (VF01) is saved. However this Idoc at the receiving SAP system is not getting posted and is giving error. I want to post invoiceverification document in th

  • XI 3.0 Sender File adapter fails to initialize

    Hello, File adapter fails to initialize with error: xml.fieldFixedLengths or xml.fieldSeparator is missing. But in the communication channel parameters definition in the 'contents conversion parameters' box I have the following: xml.fieldSeparator   

  • Mouse pointer icon

    My mouse pointer changes to other icons then does not change back to the default arrow. It has done this since installing tiger 6 months ago. I discovered if I move the pointer around the dock launch it will randomly get fixed. Anyone have a suggesti

  • Educator's discount - Can I receive even though I'm in South Korea?

    Hello!  I'm a university professor in Seoul, South Korea and would like to get the English version of Captivate using the educator's discount.  This educator's version is offered on the U.S. site.  I don't know if they offer a similar discount for Ko