You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Murat Hazer <mu...@gmail.com> on 2006/03/26 08:51:35 UTC

Facelet and JSF View handler together

Hi,

   I am on a project which is not using facelets right now and i want to
migrate the project to facelets in time. So i wanna ask that is it possible
that using myfaces JSPViewHandler and FaceletViewHandler together? (some
pages Facelets and others are JSP).

--
Murat HAZER
Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
Blog URL: http://www.projedunyasi.org
Yahoo Group: http://groups.yahoo.com/group/malatyafenlisesi97/

Re: Facelet and JSF View handler together

Posted by kyphung <ky...@gmail.com>.
Please show me what 's this error? And how to repair it?
I can't still run ViewHandler and FaceletsViewHandler together.
Thank you much...
<---------------------------- catalina  
tomcat----------------------------------------->
Apr 3, 2006 9:40:35 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Portable Runtime which allows optimal performance in
production environments was not found on the java.library.path:
/opt/jdk1.5.0_06/jre/lib/i386/client:/opt/jdk1.5.0_06/jre/lib/i386:/opt/jdk1.5.0_06/jre/../lib/i386
Apr 3, 2006 9:40:36 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 3, 2006 9:40:36 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3377 ms
Apr 3, 2006 9:40:36 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 3, 2006 9:40:36 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.12
Apr 3, 2006 9:40:36 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Apr 3, 2006 9:40:47 AM com.sun.faces.config.ConfigureListener verifyObjects
INFO: Application object verification completed successfully
Apr 3, 2006 9:40:48 AM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation
(1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
Apr 3, 2006 9:40:51 AM
com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
INFO: JSF1014: Unable to load annotation class
'javax.annotation.PostConstruct'.  As a result, this annotation will not be
processed.
Apr 3, 2006 9:40:51 AM
com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
INFO: JSF1014: Unable to load annotation class
'javax.annotation.PreDestroy'.  As a result, this annotation will not be
processed.
Apr 3, 2006 9:40:53 AM com.sun.faces.config.ConfigureListener isJspTwoOne
WARNING: Incorrect JSP version found, method getJspApplicationContext does
not exist.
Apr 3, 2006 9:40:53 AM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Completed initializing Sun's JavaServer Faces implementation
(1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
Apr 3, 2006 9:40:53 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 3, 2006 9:40:54 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 3, 2006 9:40:54 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/66  config=null
Apr 3, 2006 9:40:54 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Apr 3, 2006 9:40:55 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 18963 ms

--
View this message in context: http://www.nabble.com/Facelet-and-JSF-View-handler-together-t1343779.html#a3719236
Sent from the MyFaces - Users forum at Nabble.com.


Re: Facelet and JSF View handler together

Posted by Murat Hazer <mu...@gmail.com>.
appfuse is an example application. if it is too complicated you can take a
look to this article
http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html both of them
have source code, you can download source and work on them.

regards

On 4/1/06, kyphung <ky...@gmail.com> wrote:
>
>
> Thank for showing me. I will try again, but if you have any exsample, give
> me
> please.
> regrads....
> --
> View this message in context:
> http://www.nabble.com/Facelet-and-JSF-View-handler-together-t1343779.html#a3702045
> Sent from the MyFaces - Users forum at Nabble.com.
>
>


--
Murat HAZER
Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
Tel - Phone: +90 222 335 05 80 - 1395
Cep Tel - Mobile Phone: +90 532 472 00 63
Blog URL: http://www.projedunyasi.org
Yahoo Group: http://groups.yahoo.com/group/malatyafenlisesi/

Re: Facelet and JSF View handler together

Posted by kyphung <ky...@gmail.com>.
Thank for showing me. I will try again, but if you have any exsample, give me
please.
regrads....
--
View this message in context: http://www.nabble.com/Facelet-and-JSF-View-handler-together-t1343779.html#a3702045
Sent from the MyFaces - Users forum at Nabble.com.


Re: Facelet and JSF View handler together

Posted by Murat Hazer <mu...@gmail.com>.
your web.xml (/WEB-INF/web.xml) is not correct it is another facec-config
file defintion. I recomend you take a deep look to appfuse kickstart example
htp://appfuse.dev.java.net/ . It is a very nice point to start. You can look
to web.xml file in the appfuse. You need to add the lines which i sent in
the previous post to web.xml to have facelet support.

regards....

On 4/1/06, kyphung <ky...@gmail.com> wrote:
>
>
> Dear sir,
> this is my web.xml
> <-----------------------------web.xml------------------------------------>
> <?xml version='1.0' encoding='UTF-8'?>
>
>
>
> <!DOCTYPE faces-config PUBLIC
>
>   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
>
>   "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
>
>
>
> <faces-config>
>
>
>
>   <!-- from project setup -->
>   <application>
>     <view-handler>
>       com.sun.facelets.FaceletViewHandler
>     </view-handler>
>   </application>
>
>
>   <!-- our NumberBean we created before -->
>
>   <managed-bean>
>
>     <managed-bean-name>IncreaseNumberBean</managed-bean-name>
>
>     <managed-bean-class>beans.IncreaseNumberBean</managed-bean-class>
>
>     <managed-bean-scope>session</managed-bean-scope>
>
>   </managed-bean>
>
>
>
>    <managed-bean>
>
>     <managed-bean-name>AddNumberBean</managed-bean-name>
>
>     <managed-bean-class>beans.AddNumberBean</managed-bean-class>
>
>     <managed-bean-scope>session</managed-bean-scope>
>
>   </managed-bean>
>
>
>
>   <!-- going from addNumberPage.xhtml to responseAddNP.xhtml -->
>
>   <navigation-rule>
>
>     <from-view-id>/addNumberPage.xhtml</from-view-id>
>
>     <navigation-case>
>
>       <from-outcome>success</from-outcome>
>
>       <to-view-id>/responseAddNP.xhtml</to-view-id>
>
>     </navigation-case>
>
>   </navigation-rule>
>
>
>   <!-- going from responseAddNP.xhtml to guess.xhtml -->
>   <navigation-rule>
>     <from-view-id>/responseAddNP.xhtml</from-view-id>
>     <navigation-case>
>         <from-outcome>success</from-outcome>
>       <to-view-id>/addNumberPage.xhtml</to-view-id>
>     </navigation-case>
>   </navigation-rule>
>
>   <!-- going from increaseNumberPage.xhtml to responseIncNP.xhtml -->
>   <navigation-rule>
>     <from-view-id>/increaseNumberPage.xhtml</from-view-id>
>     <navigation-case>
>       <from-outcome>success</from-outcome>
>       <to-view-id>/responseIncNP.xhtml</to-view-id>
>     </navigation-case>
>   </navigation-rule>
>
>   <!-- going from responseIncNP.xhtml to guess.xhtml -->
>   <navigation-rule>
>     <from-view-id>/responseIncNP.xhtml</from-view-id>
>     <navigation-case>
>         <from-outcome>success</from-outcome>
>       <to-view-id>/increaseNumberPage.xhtml</to-view-id>
>     </navigation-case>
>   </navigation-rule>
>
>
>   <!-- going from responseIncNP.xhtml to guess.xhtml -->
>   <navigation-rule>
>     <from-view-id>/connectJSP_xhtml.xhtml</from-view-id>
>     <navigation-case>
>         <from-outcome>success</from-outcome>
>       <to-view-id>/connectJSP_jsp.jsp</to-view-id>
>     </navigation-case>
>   </navigation-rule>
>
>
> </faces-config>
>
>
>
>
>
> <-----------------------------
> faces-config.xml------------------------------------>
> <?xml version='1.0' encoding='UTF-8'?>
>
>
>
> <!DOCTYPE faces-config PUBLIC
>
>   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
>
>   "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
>
>
>
> <faces-config>
>
>
>
>   <!-- from project setup -->
>   <application>
>     <view-handler>
>       com.sun.facelets.FaceletViewHandler
>     </view-handler>
>   </application>
>
>
>   <!-- our NumberBean we created before -->
>
>   <managed-bean>
>
>     <managed-bean-name>IncreaseNumberBean</managed-bean-name>
>
>     <managed-bean-class>beans.IncreaseNumberBean</managed-bean-class>
>
>     <managed-bean-scope>session</managed-bean-scope>
>
>   </managed-bean>
>
>
>
>    <managed-bean>
>
>     <managed-bean-name>AddNumberBean</managed-bean-name>
>
>     <managed-bean-class>beans.AddNumberBean</managed-bean-class>
>
>     <managed-bean-scope>session</managed-bean-scope>
>
>   </managed-bean>
>
>
>
>   <!-- going from addNumberPage.xhtml to responseAddNP.xhtml -->
>
>   <navigation-rule>
>
>     <from-view-id>/addNumberPage.xhtml</from-view-id>
>
>     <navigation-case>
>
>       <from-outcome>success</from-outcome>
>
>       <to-view-id>/responseAddNP.xhtml</to-view-id>
>
>     </navigation-case>
>
>   </navigation-rule>
>
>
>   <!-- going from responseAddNP.xhtml to guess.xhtml -->
>   <navigation-rule>
>     <from-view-id>/responseAddNP.xhtml</from-view-id>
>     <navigation-case>
>         <from-outcome>success</from-outcome>
>       <to-view-id>/addNumberPage.xhtml</to-view-id>
>     </navigation-case>
>   </navigation-rule>
>
>   <!-- going from increaseNumberPage.xhtml to responseIncNP.xhtml -->
>   <navigation-rule>
>     <from-view-id>/increaseNumberPage.xhtml</from-view-id>
>     <navigation-case>
>       <from-outcome>success</from-outcome>
>       <to-view-id>/responseIncNP.xhtml</to-view-id>
>     </navigation-case>
>   </navigation-rule>
>
>   <!-- going from responseIncNP.xhtml to guess.xhtml -->
>   <navigation-rule>
>     <from-view-id>/responseIncNP.xhtml</from-view-id>
>     <navigation-case>
>         <from-outcome>success</from-outcome>
>       <to-view-id>/increaseNumberPage.xhtml</to-view-id>
>     </navigation-case>
>   </navigation-rule>
>
>
>   <!-- going from responseIncNP.xhtml to guess.xhtml -->
>   <navigation-rule>
>     <from-view-id>/connectJSP_xhtml.xhtml</from-view-id>
>     <navigation-case>
>         <from-outcome>success</from-outcome>
>       <to-view-id>/connectJSP_jsp.jsp</to-view-id>
>     </navigation-case>
>   </navigation-rule>
>
>
> </faces-config>
>
>
>
>
>
>
> <-----------------------------
> catalina.2006-04-01.log------------------------------------>
> Apr 1, 2006 1:12:30 PM org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
> INFO: The Apache Portable Runtime which allows optimal performance in
> production environments was not found on the java.library.path:
>
> /opt/jdk1.5.0_06/jre/lib/i386/client:/opt/jdk1.5.0_06/jre/lib/i386:/opt/jdk1.5.0_06/jre/../lib/i386
> Apr 1, 2006 1:12:30 PM org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Apr 1, 2006 1:12:30 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 3492 ms
> Apr 1, 2006 1:12:31 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Apr 1, 2006 1:12:31 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.12
> Apr 1, 2006 1:12:31 PM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Apr 1, 2006 1:12:35 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive myfacesFacelets.war
> Apr 1, 2006 1:12:44 PM com.sun.faces.config.ConfigureListener
> contextInitialized
> INFO: Initializing Sun's JavaServer Faces implementation
> (1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
> Apr 1, 2006 1:12:48 PM
> com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
> INFO: JSF1014: Unable to load annotation class
> 'javax.annotation.PostConstruct'.  As a result, this annotation will not
> be
> processed.
> Apr 1, 2006 1:12:48 PM
> com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
> INFO: JSF1014: Unable to load annotation class
> 'javax.annotation.PreDestroy'.  As a result, this annotation will not be
> processed.
> Apr 1, 2006 1:12:51 PM com.sun.faces.config.ConfigureListener isJspTwoOne
> WARNING: Incorrect JSP version found, method getJspApplicationContext does
> not exist.
> Apr 1, 2006 1:12:51 PM com.sun.faces.config.ConfigureListener
> contextInitialized
> INFO: Completed initializing Sun's JavaServer Faces implementation
> (1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
> Apr 1, 2006 1:12:52 PM org.apache.coyote.http11.Http11BaseProtocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Apr 1, 2006 1:12:52 PM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Apr 1, 2006 1:12:52 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/178  config=null
> Apr 1, 2006 1:12:52 PM org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> Apr 1, 2006 1:12:53 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 22479 ms
> Apr 1, 2006 1:18:28 PM com.sun.faces.lifecycle.LifecycleImpl
> populateFacesELResolverForJsp
> INFO: FacesELResolvers not registered with Jsp.
> Apr 1, 2006 1:33:06 PM org.apache.catalina.startup.HostConfigcheckResources
> INFO: Reloading context [/Facelets_exsample]
> Apr 1, 2006 1:33:07 PM com.sun.faces.config.ConfigureListener
> contextInitialized
> INFO: Initializing Sun's JavaServer Faces implementation
> (1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
> Apr 1, 2006 1:33:10 PM
> com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
> INFO: JSF1014: Unable to load annotation class
> 'javax.annotation.PostConstruct'.  As a result, this annotation will not
> be
> processed.
> Apr 1, 2006 1:33:10 PM
> com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
> INFO: JSF1014: Unable to load annotation class
> 'javax.annotation.PreDestroy'.  As a result, this annotation will not be
> processed.
> Apr 1, 2006 1:33:13 PM com.sun.faces.config.ConfigureListener isJspTwoOne
> WARNING: Incorrect JSP version found, method getJspApplicationContext does
> not exist.
> Apr 1, 2006 1:33:13 PM com.sun.faces.config.ConfigureListener
> contextInitialized
> INFO: Completed initializing Sun's JavaServer Faces implementation
> (1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
> Apr 1, 2006 1:36:14 PM org.apache.catalina.startup.HostConfigcheckResources
> INFO: Reloading context [/Facelets_exsample]
> Apr 1, 2006 1:36:15 PM com.sun.faces.config.ConfigureListener
> contextInitialized
> INFO: Initializing Sun's JavaServer Faces implementation
> (1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
> Apr 1, 2006 1:36:17 PM
> com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
> INFO: JSF1014: Unable to load annotation class
> 'javax.annotation.PostConstruct'.  As a result, this annotation will not
> be
> processed.
> Apr 1, 2006 1:36:17 PM
> com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
> INFO: JSF1014: Unable to load annotation class
> 'javax.annotation.PreDestroy'.  As a result, this annotation will not be
> processed.
> Apr 1, 2006 1:36:19 PM com.sun.faces.config.ConfigureListener isJspTwoOne
> WARNING: Incorrect JSP version found, method getJspApplicationContext does
> not exist.
> Apr 1, 2006 1:36:20 PM com.sun.faces.config.ConfigureListener
> contextInitialized
> INFO: Completed initializing Sun's JavaServer Faces implementation
> (1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
>
>
> <---------------------------
> localhost.2006-04-01----------------------------------->
> Apr 1, 2006 1:12:41 PM org.apache.catalina.core.ApplicationContext log
> INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
> [org.apache.webapp.balancer.RuleChain:
> [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News
> /
> Redirect URL: http://www.cnn.com],
> [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
> paramName / Target param value: paramValue / Redirect URL:
> http://www.yahoo.com],
> [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
> http://jakarta.apache.org]]
> Apr 1, 2006 1:12:44 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Apr 1, 2006 1:12:44 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
>
>
> <--------------------
> http://localhost:8080/Facelets_exsample/guess.jsf------------------------------------------
> >
> HTTP Status 404 - /Facelets_exsample/guess.jsf
> type Status report
> message /Facelets_exsample/guess.jsf
> description The requested resource (/Facelets_exsample/guess.jsf) is not
> available.
> Apache Tomcat/5.5.12
>
>
>
> <--------------------------------------------------------------------------------->
> Help me!
> or Can you give me a exsample about using VIEWHANDLE (JSP) and FACELETS
> together.
>
> Please. Thank you.
> anh this is my email: kyphung@gmail.com
> --
> View this message in context:
> http://www.nabble.com/Facelet-and-JSF-View-handler-together-t1343779.html#a3701221
> Sent from the MyFaces - Users forum at Nabble.com.
>
>


--
Murat HAZER
Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
Tel - Phone: +90 222 335 05 80 - 1395
Cep Tel - Mobile Phone: +90 532 472 00 63
Blog URL: http://www.projedunyasi.org
Yahoo Group: http://groups.yahoo.com/group/malatyafenlisesi/

Re: Facelet and JSF View handler together

Posted by kyphung <ky...@gmail.com>.
Dear sir, 
this is my web.xml
<-----------------------------web.xml------------------------------------>
<?xml version='1.0' encoding='UTF-8'?>



<!DOCTYPE faces-config PUBLIC

  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"

  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">



<faces-config>

			

  <!-- from project setup -->
  <application>
    <view-handler>
      com.sun.facelets.FaceletViewHandler
    </view-handler>    
  </application>
    

  <!-- our NumberBean we created before -->

  <managed-bean>

    <managed-bean-name>IncreaseNumberBean</managed-bean-name>

    <managed-bean-class>beans.IncreaseNumberBean</managed-bean-class>

    <managed-bean-scope>session</managed-bean-scope>

  </managed-bean>

  

   <managed-bean>

    <managed-bean-name>AddNumberBean</managed-bean-name>

    <managed-bean-class>beans.AddNumberBean</managed-bean-class>

    <managed-bean-scope>session</managed-bean-scope>

  </managed-bean>

  

  <!-- going from addNumberPage.xhtml to responseAddNP.xhtml -->

  <navigation-rule>

    <from-view-id>/addNumberPage.xhtml</from-view-id>

    <navigation-case>

      <from-outcome>success</from-outcome>

      <to-view-id>/responseAddNP.xhtml</to-view-id>

    </navigation-case>

  </navigation-rule>


  <!-- going from responseAddNP.xhtml to guess.xhtml -->
  <navigation-rule>
    <from-view-id>/responseAddNP.xhtml</from-view-id>
    <navigation-case>
        <from-outcome>success</from-outcome>
      <to-view-id>/addNumberPage.xhtml</to-view-id>
    </navigation-case>
  </navigation-rule>
  
  <!-- going from increaseNumberPage.xhtml to responseIncNP.xhtml -->
  <navigation-rule>
    <from-view-id>/increaseNumberPage.xhtml</from-view-id>
    <navigation-case>
      <from-outcome>success</from-outcome>
      <to-view-id>/responseIncNP.xhtml</to-view-id>
    </navigation-case>
  </navigation-rule>
  
  <!-- going from responseIncNP.xhtml to guess.xhtml -->
  <navigation-rule>
    <from-view-id>/responseIncNP.xhtml</from-view-id>
    <navigation-case>
        <from-outcome>success</from-outcome>
      <to-view-id>/increaseNumberPage.xhtml</to-view-id>
    </navigation-case>
  </navigation-rule>


  <!-- going from responseIncNP.xhtml to guess.xhtml -->
  <navigation-rule>
    <from-view-id>/connectJSP_xhtml.xhtml</from-view-id>
    <navigation-case>
        <from-outcome>success</from-outcome>
      <to-view-id>/connectJSP_jsp.jsp</to-view-id>
    </navigation-case>
  </navigation-rule>
  

</faces-config>





<-----------------------------faces-config.xml------------------------------------>
<?xml version='1.0' encoding='UTF-8'?>



<!DOCTYPE faces-config PUBLIC

  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"

  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">



<faces-config>

			

  <!-- from project setup -->
  <application>
    <view-handler>
      com.sun.facelets.FaceletViewHandler
    </view-handler>    
  </application>
    

  <!-- our NumberBean we created before -->

  <managed-bean>

    <managed-bean-name>IncreaseNumberBean</managed-bean-name>

    <managed-bean-class>beans.IncreaseNumberBean</managed-bean-class>

    <managed-bean-scope>session</managed-bean-scope>

  </managed-bean>

  

   <managed-bean>

    <managed-bean-name>AddNumberBean</managed-bean-name>

    <managed-bean-class>beans.AddNumberBean</managed-bean-class>

    <managed-bean-scope>session</managed-bean-scope>

  </managed-bean>

  

  <!-- going from addNumberPage.xhtml to responseAddNP.xhtml -->

  <navigation-rule>

    <from-view-id>/addNumberPage.xhtml</from-view-id>

    <navigation-case>

      <from-outcome>success</from-outcome>

      <to-view-id>/responseAddNP.xhtml</to-view-id>

    </navigation-case>

  </navigation-rule>


  <!-- going from responseAddNP.xhtml to guess.xhtml -->
  <navigation-rule>
    <from-view-id>/responseAddNP.xhtml</from-view-id>
    <navigation-case>
        <from-outcome>success</from-outcome>
      <to-view-id>/addNumberPage.xhtml</to-view-id>
    </navigation-case>
  </navigation-rule>
  
  <!-- going from increaseNumberPage.xhtml to responseIncNP.xhtml -->
  <navigation-rule>
    <from-view-id>/increaseNumberPage.xhtml</from-view-id>
    <navigation-case>
      <from-outcome>success</from-outcome>
      <to-view-id>/responseIncNP.xhtml</to-view-id>
    </navigation-case>
  </navigation-rule>
  
  <!-- going from responseIncNP.xhtml to guess.xhtml -->
  <navigation-rule>
    <from-view-id>/responseIncNP.xhtml</from-view-id>
    <navigation-case>
        <from-outcome>success</from-outcome>
      <to-view-id>/increaseNumberPage.xhtml</to-view-id>
    </navigation-case>
  </navigation-rule>


  <!-- going from responseIncNP.xhtml to guess.xhtml -->
  <navigation-rule>
    <from-view-id>/connectJSP_xhtml.xhtml</from-view-id>
    <navigation-case>
        <from-outcome>success</from-outcome>
      <to-view-id>/connectJSP_jsp.jsp</to-view-id>
    </navigation-case>
  </navigation-rule>
  

</faces-config>






<-----------------------------catalina.2006-04-01.log------------------------------------>
Apr 1, 2006 1:12:30 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Portable Runtime which allows optimal performance in
production environments was not found on the java.library.path:
/opt/jdk1.5.0_06/jre/lib/i386/client:/opt/jdk1.5.0_06/jre/lib/i386:/opt/jdk1.5.0_06/jre/../lib/i386
Apr 1, 2006 1:12:30 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 1, 2006 1:12:30 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3492 ms
Apr 1, 2006 1:12:31 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 1, 2006 1:12:31 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.12
Apr 1, 2006 1:12:31 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Apr 1, 2006 1:12:35 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive myfacesFacelets.war
Apr 1, 2006 1:12:44 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation
(1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
Apr 1, 2006 1:12:48 PM
com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
INFO: JSF1014: Unable to load annotation class
'javax.annotation.PostConstruct'.  As a result, this annotation will not be
processed.
Apr 1, 2006 1:12:48 PM
com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
INFO: JSF1014: Unable to load annotation class
'javax.annotation.PreDestroy'.  As a result, this annotation will not be
processed.
Apr 1, 2006 1:12:51 PM com.sun.faces.config.ConfigureListener isJspTwoOne
WARNING: Incorrect JSP version found, method getJspApplicationContext does
not exist.
Apr 1, 2006 1:12:51 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Completed initializing Sun's JavaServer Faces implementation
(1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
Apr 1, 2006 1:12:52 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 1, 2006 1:12:52 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 1, 2006 1:12:52 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/178  config=null
Apr 1, 2006 1:12:52 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Apr 1, 2006 1:12:53 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 22479 ms
Apr 1, 2006 1:18:28 PM com.sun.faces.lifecycle.LifecycleImpl
populateFacesELResolverForJsp
INFO: FacesELResolvers not registered with Jsp.
Apr 1, 2006 1:33:06 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/Facelets_exsample]
Apr 1, 2006 1:33:07 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation
(1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
Apr 1, 2006 1:33:10 PM
com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
INFO: JSF1014: Unable to load annotation class
'javax.annotation.PostConstruct'.  As a result, this annotation will not be
processed.
Apr 1, 2006 1:33:10 PM
com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
INFO: JSF1014: Unable to load annotation class
'javax.annotation.PreDestroy'.  As a result, this annotation will not be
processed.
Apr 1, 2006 1:33:13 PM com.sun.faces.config.ConfigureListener isJspTwoOne
WARNING: Incorrect JSP version found, method getJspApplicationContext does
not exist.
Apr 1, 2006 1:33:13 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Completed initializing Sun's JavaServer Faces implementation
(1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
Apr 1, 2006 1:36:14 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/Facelets_exsample]
Apr 1, 2006 1:36:15 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation
(1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'
Apr 1, 2006 1:36:17 PM
com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
INFO: JSF1014: Unable to load annotation class
'javax.annotation.PostConstruct'.  As a result, this annotation will not be
processed.
Apr 1, 2006 1:36:17 PM
com.sun.faces.config.ManagedBeanFactoryImpl$Annotations <init>
INFO: JSF1014: Unable to load annotation class
'javax.annotation.PreDestroy'.  As a result, this annotation will not be
processed.
Apr 1, 2006 1:36:19 PM com.sun.faces.config.ConfigureListener isJspTwoOne
WARNING: Incorrect JSP version found, method getJspApplicationContext does
not exist.
Apr 1, 2006 1:36:20 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Completed initializing Sun's JavaServer Faces implementation
(1.2-NIGHTLY_20060319) for context 'Facelets Tutorial'


<---------------------------localhost.2006-04-01----------------------------------->
Apr 1, 2006 1:12:41 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
Apr 1, 2006 1:12:44 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Apr 1, 2006 1:12:44 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()


<--------------------http://localhost:8080/Facelets_exsample/guess.jsf------------------------------------------>
HTTP Status 404 - /Facelets_exsample/guess.jsf
type Status report
message /Facelets_exsample/guess.jsf
description The requested resource (/Facelets_exsample/guess.jsf) is not
available.
Apache Tomcat/5.5.12


<--------------------------------------------------------------------------------->
Help me!
or Can you give me a exsample about using VIEWHANDLE (JSP) and FACELETS
together.

Please. Thank you.
anh this is my email: kyphung@gmail.com
--
View this message in context: http://www.nabble.com/Facelet-and-JSF-View-handler-together-t1343779.html#a3701221
Sent from the MyFaces - Users forum at Nabble.com.


Re: Facelet and JSF View handler together

Posted by Murat Hazer <mu...@gmail.com>.
web.xml configuration

<!--  Facelets paramaters-->
    <context-param>
        <param-name>facelets.VIEW_MAPPINGS</param-name>
        <param-value>*.xhtml</param-value>
    </context-param>
    <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>facelets.REFRESH_PERIOD</param-name>
        <param-value>1</param-value>
    </context-param>

    <servlet id="Servlet_1118759574209">
        <description>Faces classic servlet same as IBM SUN and
myFaces</description>
        <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>

/faces/* mapping is important, if you change your web.xml file as described
above your files which has xhtml extension will be handled by Facelets view
handler.

This works for me, let me know it works for you or not.

Regards....

--
Murat HAZER
Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
Tel - Phone: +90 222 335 05 80 - 1395
Cep Tel - Mobile Phone: +90 532 472 00 63
Blog URL: http://www.projedunyasi.org
Yahoo Group: http://groups.yahoo.com/group/malatyafenlisesi97/

Re: Facelet and JSF View handler together

Posted by kyphung <ky...@gmail.com>.
Please show me particular. I get a problem about using JSPViewHandler and
FaceletViewHandler together
Please.Please.Please.Please.Please.Please.
--
View this message in context: http://www.nabble.com/Facelet-and-JSF-View-handler-together-t1343779.html#a3700337
Sent from the MyFaces - Users forum at Nabble.com.


Re: Facelet and JSF View handler together

Posted by Adam Winer <aw...@gmail.com>.
Sure, it's easy.  Check out the docs for the facelets.VIEW_MAPPINGS
init parameter:
	
https://facelets.dev.java.net/nonav/docs/dev/docbook.html#config-webapp-init

-- Adam Winer

On 3/25/06, Murat Hazer <mu...@gmail.com> wrote:
> Hi,
>
>    I am on a project which is not using facelets right now and i want to
> migrate the project to facelets in time. So i wanna ask that is it possible
> that using myfaces JSPViewHandler and FaceletViewHandler together? (some
> pages Facelets and others are JSP).
>
> --
> Murat HAZER
> Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
> Blog URL: http://www.projedunyasi.org
> Yahoo Group:
> http://groups.yahoo.com/group/malatyafenlisesi97/