WLS8.1 & JSF 1.0 Final: "Faces Servlet" failed to preload

Ok, this i what I've done. Modified the samples proprties file so everythings gets build without problems with the 1.0.x taglib.
<copy todir="${build}/${example}/WEB-INF/lib" file="${jstl.jar}"/>
<copy todir="${build}/${example}/WEB-INF/lib" file="${standard.jar}"/>
<copy todir="${build}/${example}/WEB-INF/lib" file="/jakarta-taglibs-standard-1.0.5/lib/jaxen-full.jar"/>
<copy todir="${build}/${example}/WEB-INF/lib" file="/jakarta-taglibs-standard-1.0.5/lib/saxpath.jar"/>
The jst.jar, standard.jar also point to /jakarta-taglibs-standard-1.0.5/lib
I updated the web.xml for the listener
<listener>
     <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>     
ant the web.cml validated against http://java.sun.com/dtd/web-app_2_3.dtd
If I deploy the cardemo I see:
<5/03/2004 10:28:30 PM CET> <Error> <HTTP> <BEA-101216> <Servlet: "Faces Servlet" failed to preload on startup in Web application: "jsf-cardemo".
javax.servlet.ServletException
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:884)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:848)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:787)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3252)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3197)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3174)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:688)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
>
5/03/2004 22:28:32 com.sun.faces.config.rules.NavigationRuleRule end
WARNING: [NavigationRuleRule]{faces-config/navigation-rule} Merge(/confirmChoices.jsp)
What am I still missing here? I really want to start using JSF!
Regards,
Peter

I believe I have found the issue to the problem. The issue seems to be Weblogic is not respecting part of the Servlet 2.3 spec. It states that all ServletContextListener implementations should be called before the Servlet's init method is called. Tomcat respects this and that's why JSF works when deployed in Tomcat. Weblogic 8.1 calls this instance AFTER the Servlet's init's methods are called. This results in a NullPointerException being thrown.
     You can see how the ordering changes between Weblogic and Tomcat for yourself by editing the log4j.properties file and add the following:
log4j.category.com.sun.faces.config = DEBUG, config log4j.additivity.com.sun.faces.config=false
log4j.appender.config = org.apache.log4j.ConsoleAppender log4j.appender.config.layout = org.apache.log4j.PatternLayout log4j.appender.config.layout.ConversionPattern = ...
     Deploy the example application to both Weblogic and Tomcat and observe the order.
     I've developed a work around for this issue. Weblogic seems to respect the <load-on-startup> element in the web.xml file. I have written a Servlet which manually loads the ServletContextListener for JSF. The code below:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.faces.FactoryFinder;
import javax.faces.lifecycle.LifecycleFactory;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
public class WeblogicHackServlet extends HttpServlet {
public static final String CONFIGURE_LISTENER_KEY = "CONFIGURE_LISTENER"; public static final transient Log logger = LogFactory.getLog(WeblogicHackServlet.class);
public void init(ServletConfig servletConfig) throws ServletException {
LifecycleFactory factory =(LifecycleFactory)      
FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
if (factory != null)
return;
String className = servletConfig.getInitParameter(CONFIGURE_LISTENER_KEY);
if (className == null) {
logger.fatal("Did not find the init parameter " + CONFIGURE_LISTENER_KEY);
return;
try {
Class aClass = Class.forName(className);
ServletContextListener listener = (ServletContextListener)
               aClass.newInstance();
listener.contextInitialized(
     new ServletContextEvent(servletConfig.getServletContext()));
} catch (Exception e) {
logger.fatal("The ConfigureListener could not be triggered", e);
     The web.xml file also needs to be changed to the following:
<servlet>
<servlet-name>WeblogicHackServlet</servlet-name>
<servlet-class>WeblogicHackServlet</servlet-class>
<init-param>
<param-name>CONFIGURE_LISTENER</param-name>
<param-value>com.sun.faces.config.ConfigureListener</param-value>
</init-param>
<load-on-startup> 1 </load-on-startup>
</servlet>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 2 </load-on-startup>
</servlet>
This causes JSF to load properly. Hopefully, BEA can resolve this issue so my hack can be removed.
Thanks,
Louis Calisi
Applications Architect

Similar Messages

  • Servlet Failed to preload on Startup - WebLogic 8.1

    Hi there,
    I am getting the following error message when I start up my application in WebLogic.
    (see below my post for execat error). I only get this when I try to run my application
    as a .WAR file. If I expand the .war file and run it that way, everything works
    just like it should. What is going on with it? How can I fix it?
    Thanks for your help.
    Joseph
    ####<May 10, 2004 1:48:15 PM EDT> <Error> <HTTP> <--HOSTNAME REMOVED--> <jbajin-adm>
    <ExecuteThread: '4' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <> <BEA-101216>
    <Servlet: "dbfrontload" failed to preload on startup in Web application: "pricing".
    javax.servlet.ServletException
    at weblogic.servlet.internal.ServletStubImpl.createServlet()Ljavax.servlet.Servlet;(ServletStubImpl.java:884)
    at weblogic.servlet.internal.ServletStubImpl.createInstances()V(ServletStubImpl.java:848)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(Lweblogic.servlet.internal.RequestCallback;)V(ServletStubImpl.java:787)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(Ljava.lang.String;)V(WebAppServletContext.java:3252)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets()V(WebAppServletContext.java:3197)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources()V(WebAppServletContext.java:3174)
    at weblogic.servlet.internal.WebAppServletContext.setStarted(Z)V(WebAppServletContext.java:5647)
    at weblogic.servlet.internal.WebAppModule.start()V(WebAppModule.java:869)
    at weblogic.j2ee.J2EEApplicationContainer.start([Lweblogic.j2ee.J2EEApplicationContainer$Component;)V(J2EEApplicationContainer.java:2022)
    at weblogic.j2ee.J2EEApplicationContainer.activate([Lweblogic.management.configuration.ComponentMBean;)V(J2EEApplicationContainer.java:2063)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer()V(SlaveDeployer.java:2592)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit()V(SlaveDeployer.java:2515)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.commit()V(SlaveDeployer.java:2317)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit()V(SlaveDeployer.java:2399)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare()V(SlaveDeployer.java:2311)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare()V(SlaveDeployer.java:2479)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Lweblogic.management.deploy.OamVersion;Lweblogic.management.runtime.DeploymentTaskRuntimeMBean;Z)V(SlaveDeployer.java:798)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(Lweblogic.management.deploy.OamDelta;Lweblogic.management.deploy.OamVersion;Z)Z(SlaveDeployer.java:507)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(Ljava.util.ArrayList;Z)V(SlaveDeployer.java:465)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(Lweblogic.kernel.ExecuteThread;)V(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(Optimized
    Method)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)

    Hi Rob,
    I found you are helping others and familiar with deployment problems. I am also
    struggling to resolve deployment problem on Weblogic 8.1sp2. I hope you can help
    on this, here is the problem I am facing while deploying my web application.
    <27-May-2004 12:00:49 o'clock BST> <Error> <HTTP> <BEA-101216> <Servlet: "action
    tion: "site20pub".
    javax.servlet.ServletException: org/apache/xerces/parsers/SAXParser
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
    at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java
    at weblogic.servlet.internal.WebService.preloadResources(WebService.java
    at weblogic.servlet.internal.ServletInitService.resume(ServletInitServic
    at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
    at weblogic.Server.main(Server.java:32)
    any help on this very much appreciated.
    Thanks
    Ranga
    Rob Woollen <[email protected]> wrote:
    It looks like your servlet's constructor or init method is throwing an
    exception.
    Are you perhaps using getRealPath in one of those methods? That will
    return Null when you're archived, but the path when you're exploded.
    -- Rob
    Joseph Bajin wrote:
    Hi there,
    I am getting the following error message when I start up my applicationin WebLogic.
    (see below my post for execat error). I only get this when I try torun my application
    as a .WAR file. If I expand the .war file and run it that way, everythingworks
    just like it should. What is going on with it? How can I fix it?
    Thanks for your help.
    Joseph
    ####<May 10, 2004 1:48:15 PM EDT> <Error> <HTTP> <--HOSTNAME REMOVED--><jbajin-adm>
    <ExecuteThread: '4' for queue: 'weblogic.kernel.System'> <<WLS Kernel>><> <BEA-101216>
    <Servlet: "dbfrontload" failed to preload on startup in Web application:"pricing".
    javax.servlet.ServletException
    at weblogic.servlet.internal.ServletStubImpl.createServlet()Ljavax.servlet.Servlet;(ServletStubImpl.java:884)
    at weblogic.servlet.internal.ServletStubImpl.createInstances()V(ServletStubImpl.java:848)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(Lweblogic.servlet.internal.RequestCallback;)V(ServletStubImpl.java:787)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(Ljava.lang.String;)V(WebAppServletContext.java:3252)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets()V(WebAppServletContext.java:3197)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources()V(WebAppServletContext.java:3174)
    at weblogic.servlet.internal.WebAppServletContext.setStarted(Z)V(WebAppServletContext.java:5647)
    at weblogic.servlet.internal.WebAppModule.start()V(WebAppModule.java:869)
    at weblogic.j2ee.J2EEApplicationContainer.start([Lweblogic.j2ee.J2EEApplicationContainer$Component;)V(J2EEApplicationContainer.java:2022)
    at weblogic.j2ee.J2EEApplicationContainer.activate([Lweblogic.management.configuration.ComponentMBean;)V(J2EEApplicationContainer.java:2063)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer()V(SlaveDeployer.java:2592)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit()V(SlaveDeployer.java:2515)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.commit()V(SlaveDeployer.java:2317)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit()V(SlaveDeployer.java:2399)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare()V(SlaveDeployer.java:2311)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare()V(SlaveDeployer.java:2479)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Lweblogic.management.deploy.OamVersion;Lweblogic.management.runtime.DeploymentTaskRuntimeMBean;Z)V(SlaveDeployer.java:798)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(Lweblogic.management.deploy.OamDelta;Lweblogic.management.deploy.OamVersion;Z)Z(SlaveDeployer.java:507)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(Ljava.util.ArrayList;Z)V(SlaveDeployer.java:465)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(Lweblogic.kernel.ExecuteThread;)V(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(Optimized
    Method)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(UnknownSource)

  • Servlet failed to preload on startup

    Hi,
    I have installed and configured weblogic portal 8.1.6 and when i tried to start the server i am getting the following exceptions.
    1. <Error> <HTTP> <BEA-101216> <Servlet: "AppManagerServlet" failed to preload on startup in Web application: "mit".
    javax.servlet.ServletException: FRAMEWORK
    2. <Error> <HTTP> <BEA-101216> <Servlet: "PortletServlet" failed to preload on startup in Web application: "mit".
    javax.servlet.ServletException: com/bea/p13n/cache/internal/system/CacheConfig
    etc.
    Before this new version i was using weblogic Portal 8.1.3.
    Please help me to solve this issue.

    Hi,
    I have installed and configured weblogic portal 8.1.6 and when i tried to start the server i am getting the following exceptions.
    1. <Error> <HTTP> <BEA-101216> <Servlet: "AppManagerServlet" failed to preload on startup in Web application: "mit".
    javax.servlet.ServletException: FRAMEWORK
    2. <Error> <HTTP> <BEA-101216> <Servlet: "PortletServlet" failed to preload on startup in Web application: "mit".
    javax.servlet.ServletException: com/bea/p13n/cache/internal/system/CacheConfig
    etc.
    Before this new version i was using weblogic Portal 8.1.3.
    Please help me to solve this issue.

  • Use of filter to JSF faces servlet

    Hi
    I have a JSF application which is secured by a custom security framework (similar to SITE MINDER). The security framework after authentication passes the authenticated user name within a in-memory session cookie.
    The entire user information like his group and access restrictions (field / UI compoonent level) resides in the application database
    I have used a filter to JSF Faces servlet to retrieve the user information from the database and storing in session.
    Is this use of filter a good approach?

    I would fetch such information only once and store it in a simple session scoped bean after a successful login, but I am weird for wanting to do things in a simple way.
    A filter can work to validate if the user is still "logged in" (IE. his/her session didn't expire), but since this is JSF you could also use a phase listener for such a purpose.

  • Faces Servlet no getting called when accessing JSF portlet

    Hi,
    I have a JSF web application and I am exposing the functionality of this JSF web application using native Weblogic Portal JSF portlets. I have configured this JSF web application as a simple producer and I am consuming these portlets in my portal using WSRP.
    I have written a custom FacesServlet and configured it in the web.xml of the producer web application. When I access the pages in the producer web app like a normal web app, I see that my faces servlet is being called but when I consume these pages via the JSF portlet and view the portlets in the portal then the Faces servlet is not being called.
    Is this normal behavior or is WSRP causing this problem or am I missing something. Your help is greatly appreciated.
    Regards,
    Hitesh

    Hi Hitesh,
    What I was asking you to give a try was, configure the standard faces servlet for example if you are using JSF RI
    the configuration will look like
        <servlet>
            <servlet-name>FacesServlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>100</load-on-startup>
        </servlet>I am not very sure whether this can solve the problem.
    Thanks
    Sreeram
    Edited by sreeram.jonnalagadda at 06/10/2008 4:46 AM

  • Issue in converting Struts view to JSF view using struts-faces integration

    Hi All,
    I am facing a issue in my Sruts to JSF conversion application using struts-faces.jar integration library.
    Need expert's help desperately as I am not able to use <s:form> tag in my new jsf page to call a struts action.
    I want to call a struts action from my web page designed using JSF,
    but it seems impossible without using <s:form> tag from struts-faces integration library.
    Please suggest how to resolve this...
    I am using WSAD 5.1 IDE with inbuilt Test environment WebSphere server
    JSF Version: Sun's RI 1.1
    Struts framework: 1.2.6
    Struts-Faces Integration Library version: 1.0
    I have configured a controller element in struts-config.xml file as has been suggested by different online
    documents I studied:
    <controller>
    <set-property property="processorClass"
    value="org.apache.struts.faces.application.FacesRequestProcessor"/>
    </controller>
    But configuring a controller does not allow my test server to start up properly and due to errors the ActionServlet also becomes unavailable.
    If I comment the controller and start the test server it starts fine but then I cannot access the converted jsf page which contains the <s:form action="/xxxxx.do"> tag.
    If now I get back to <h:form> tag instead of <s:form> tag with a <h:commandButton action="xxxx.do"/> for form submission in my jsf page, I see the html page generated with all components but now checking the html source generated I see
    <form action="/contextName/jspFolder/sameDisplayedPage.jsf"> which is not valid and never gets called successfully.
    I think someways I need to use the <s:form> tag with the controller configured properly to use the struts-faces integration library's request processor, to get things working. But HOW???
    Following is the error I get if I use the <controller> tag element in struts-config.xml file and start the server.
    This error appears on starting the server without accessing any application's jsp web page
    [6/12/06 15:31:14:109 IST] 3e311815 ActionServlet E org.apache.struts.action.ActionServlet Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
    [6/12/06 15:31:14:109 IST] 3e311815 ActionServlet E org.apache.struts.action.ActionServlet TRAS0014I: The following exception was logged java.lang.IllegalAccessError: org.apache.commons.digester.SetPropertyRule tried to access method org/apache/commons/beanutils/BeanUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V
    at org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:198)
    at org.apache.commons.digester.Rule.begin(Rule.java:200)
    at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1548)
    at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:736)
    at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:685)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:331)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
    at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
    at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
    at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
    at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
    at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
    at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
    at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
    at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
    at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
    at java.lang.reflect.Method.invoke(Method.java:386)
    at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
    at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
    [6/12/06 15:31:14:188 IST] 3e311815 WebGroup E SRVE0020E: [Servlet Error]-[ActionServlet]: Failed to load servlet: javax.servlet.UnavailableException: org.apache.commons.digester.SetPropertyRule tried to access method org/apache/commons/beanutils/BeanUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:366)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
    at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
    at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
    at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
    at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
    at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
    at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
    at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
    at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
    at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
    at java.lang.reflect.Method.invoke(Method.java:386)
    at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
    at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
    (same error message re-iterates/repeats itself... and finally -
    Error 503: Failed to load target servlet [ActionServlet] comes in web-browser
    Following is the error which I get if I comment the <controller> element in the struts-config.xml file
    and use a <s:form action="xxxxx.do"> in the struts converted jsf page. The web-server starts fine, but
    accessing the jsf page givers error as:
    [6/12/06 15:38:00:781 IST] 696f19de WebGroup I SRVE0180I: [Sample Struts-JSF integration application] [training2] [Servlet.LOG]: /jsp/welcomeF.jsp: init
    [6/12/06 15:38:01:219 IST] 696f19de WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
    at org.apache.struts.faces.renderer.FormRenderer.encodeBegin(FormRenderer.java:114)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
    at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591)
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:478)
    at org.apache.jsp._welcomeF._jspService(_welcomeF.java:207)
    at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:662)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
    at org.apache.struts.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1054)
    at org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:992)
    at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:551)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    Finally if I change my <s:form action="xxxxx.do"> tag to
    <h:form>
    <h:commandButton id="submit" action="xxxx.do" value="Submit" />
    I see the webpage coming up in the browser (no controller element used in struts-config.xml file this time)
    But in the html source of this html created from jsf I see
    <form id="_id2" method="post" action="/training2/jsp/welcomeF.faces" enctype="application/x-www-form-urlencoded">
    here form's action attribute is pointing to the same displayed page with the context name prefixed. I
    assume it is because jsf could not resolve the "xxxx.do" action to anything so set it to the same displayed page.
    May be I am wrong as usual...
    Below is the simple struts jsp page which I need to convert to jsf page as I am converting only the View part of application.
    I want to use the same struts beans and application logic at the back-end. At front-end I need UIComponents from JSF to be used.
    Following is the struts jsp page
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
    <%@ taglib prefix="html" uri="/WEB-INF/lib/struts-html.tld" %>
    <%@ taglib prefix="bean" uri="/WEB-INF/lib/struts-bean.tld" %>
    <html:html>
    <html:base/>
    <html:messages id="messages" />
    <font style="color:red; font=weight:italic; font-family: century gothic">
    <html:errors/>
    </font>
    <BODY>
    <P>Sample Struts and JSF integration example</P>
    <P>This one is being displayed via Struts specific tags</P>
    <html:form action="validateUser.do">
    <bean:message key="label.name" /> : <html:text property="name" />
    <bean:message key="label.password" /> : <html:password property="password" />
    <bean:message key="label.age" /> : <html:text property="age" />
    <bean:message key="label.city" /> : <html:text property="city" />
    <bean:message key="label.address" /> : <html:text property="address" />
    <html:submit property="submit" value="Show info via Struts" />
    </html:form>
    </BODY>
    </html:html>
    I have converted it into the following jsf page
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://struts.apache.org/tags-faces" prefix="s" %>
    <f:view>
    <HTML><BODY>
    <f:verbatim><P>Sample Struts and JSF integration example</P></f:verbatim>
    <f:verbatim><P>This one is being displayed via JSF tags</P></f:verbatim>
    <h:form> <!-- Want to use s:form tag instead of this h:form tag -->
    <h:inputText id="name" value="#{userForm.name}" /><f:verbatim>
    </f:verbatim>
    <h:inputSecret id="password" value="#{userForm.password}" /><f:verbatim>
    </f:verbatim>
    <h:inputText id="age" value="#{userForm.age}" /><f:verbatim>
    </f:verbatim>
    <h:inputText id="city" value="#{userForm.city}" /><f:verbatim>
    </f:verbatim>
    <h:inputText id="address" value="#{userForm.address}" /><f:verbatim>
    </f:verbatim>
    <h:commandButton id="submit" action="#{user.facesAction}" value="Show info via Struts" />
    </h:form>
    </BODY></HTML>
    </f:view>
    I am very hopeful of some answer from respected group experts, please help me.
    I am in urgency of course but would not push for immed. response like other, just want some help for sure that is going to
    be extremely valuable to me. Anticipating a helping hand...
    Thanks and Regards
    Vishal Sharm
    Time's fun when you're having flies � Kermit, the Frog
    -------------------------------------------------------------------------

    I've managed to get this working Ok from JDeveloper:
    See:
    http://www.groundside.com/blog/content/DuncanMills/J2EE+Development/?permalink=573FDB6F8D918B9704907899635CABB1.txt
    http://www.groundside.com/blog/content/DuncanMills/J2EE+Development/?permalink=2B04ACE99A6437EDED775F15553D1DED.txt
    Basically you just have to fiddle around with Library settings to get this working OK.
    As to how useful this is, well that's up to you - I'd not regard Faces + Struts as a must use combination, rather it's a can mix if you really need to. Look at Faces and Faces navigation first and see if that actually gives you enough before you start to look at mixing.

  • Navigation issue using jsf, tiles, tomahawk  :loosing faces context

    Hi all,
    I enhanced my webapp using tomahawks jscookmenu.
    Triggering 1 menuItem the wanted pages displays correctly but the next click anywhere in the application shows this error:
    org.apache.jasper.JasperException: javax.faces.FacesException: Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml configuration fileand if you are accessing your jsf-pages through the correct mapping. E.g.: if your FacesServlet is mapped to  *.jsf (with the <servlet-mapping>-element), you need to access your pages as 'sample.jsf'. If you tried to access 'sample.jsp', you'd get this error-message.The web config is like that:
    <?xml version="1.0"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
         <context-param>
              <description>Tiles MyFaces Config</description>
              <param-name>tiles-definitions</param-name>
              <param-value>/WEB-INF/tiles.xml</param-value>
         </context-param>
         <context-param> 
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name> 
              <param-value>.jsp</param-value>
         </context-param>
         <context-param>
              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
              <param-value>server</param-value>
         </context-param>
         <context-param>
              <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
              <param-value>off</param-value>
         </context-param>
         <!-- context-params mafaces -->
         <context-param>
              <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.RENDER_VIEWSTATE_ID</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.STRICT_XHTML_LINKS</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.CONFIG_REFRESH_PERIOD</param-name>
              <param-value>this is a bug in myfaces</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
              <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
              <param-value>/faces/myFacesExtensionResource</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
              <param-value>true</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.AUTO_SCROLL</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>
         <!-- StartupServletContextListener -->
         <listener>
              <listener-class>
                   org.apache.myfaces.webapp.StartupServletContextListener
              </listener-class>
         </listener>
         <!-- Faces MyFacesExtensionsFilter -->
         <filter>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <filter-class>
                   org.apache.myfaces.webapp.filter.ExtensionsFilter
              </filter-class>
              <init-param>
                   <param-name>uploadMaxFileSize</param-name>
                   <param-value>1m</param-value>
              </init-param>
         </filter>
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>/faces/*</url-pattern>
         </filter-mapping>
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>*.jsf</url-pattern>
         </filter-mapping>
         <!-- Faces Servlet -->
         <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <!-- Faces Servlet Mapping -->
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.jsf</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
         </welcome-file-list>
         <servlet>
              <servlet-name>imageServlet</servlet-name>
              <servlet-class>my.com.xplorer.gui.v.ImageServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>imageServlet</servlet-name>
              <url-pattern>/image/*</url-pattern>
         </servlet-mapping>
    </web-app>So I lost the faces context using the jscookmenu, I believe.
    My webapp uses tiles, and there is 2 navigation possibilities: tomahawaks jscookmenu and tomahawaks commandNavigation.
    Latter one runs ok, I do use
    <t:panelNavigation id="nav" styleClass="navigation"
         itemClass="navitem" separatorClass="navseparator" 
         activeItemClass="navitem_active" openItemClass="navitem_open">
         <t:commandNavigation action="#{newsHandler.userRequest}" value="#{newsHandler.rss_source_name[0]}">
              <f:param name="navigator"  value="/jsf/news.jsp" />
         </t:commandNavigation>
    </t:panelNavigation>for this kind of navigation I do not use any navigation rules in faces config. To dynamically include the desired faces page I do that:
    <%
         String s = (String)request.getParameter("navigator");
         if (s == null || s.length() == 0 ) {
              s =  "/jsf/explorer.jsp";
    %>
    <jsp:include page="<%=s %>" />That does work.
    Now like I said I did enhance the app by adding tomahawks jscookmenu.
    Therefore I use the following in another tile:
    <t:jscookMenu layout="hbr" theme="ThemeOffice" styleLocation="resources/css">
              <%/* Availaible jscookMenu themes: ThemeIE, ThemeMiniBlack, ThemeOffice, ThemePanel
                 Availaible jscookMenu layout: hbr, hbl, hur, hul, vbr, vbl, vur, vul
                 respect to Heng Yuan http://www.cs.ucla.edu/~heng/JSCookMenu
            */%>
      <t:navigationMenuItem id="nav_0" itemLabel="#{localz.Xplorer}" action="Xplorer" />
    </t:jscookMenu>For this kind of navigation I tried to use navigation rules and the following show the config:
         <navigation-rule>
           <from-view-id>/jsf/*</from-view-id>
            <navigation-case>
                <from-outcome>Xplorer</from-outcome>
                <to-view-id>/jsf/tileMain.jsp?navigator=/jsf/explorer.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>Tabs</from-outcome>
                <to-view-id>/jsf/tileMain.jsp?navigator=/jsf/tab.jsp</to-view-id>
            </navigation-case>
         </navigation-rule>That works for the first click. The desired page is shown. The nect click anywhere in the app then show the mentioned error.
    Using tiles I use this view-handler
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>One question is: can I use another view-handler on top of the above one? So I could extend com.sun.facelets.FaceletViewHandler and try my luck with this? Or is the solution pointed out just a millisecond from being ok, I just don�t see it?
    Maybe you need to know a bit more on how I use tiles:
    That is the page I start with. It inserts the tile shown underneath.
    <f:view locale="#{userLocale}">
         <f:loadBundle var="localz" basename="my.com.xplorer.gui.v.Lokalization" />
         <f:loadBundle var="bundle" basename="my.com.xplorer.gui.v.messages" />
         <f:subview id="tileMain">
              <h:form id="myJsfForm" styleClass="standard">
                        <tiles:insert definition="template" flush="false" />
              </h:form>
         </f:subview>
         <h:messages />
    </f:view>
    </html>The foolowing is the tile structure.
    The bodi tile is the dynamic part. Above you see that I dynamically load the pages into it.
    <t:htmlTag value="div" styleClass="pageLayout">
         <h:panelGrid columns="2" align="center" styleClass="pageContent">
              <f:facet name="header">
                   <f:subview id="header">
                        <tiles:insert attribute="header" flush="false" />
                   </f:subview>
              </f:facet>
              <t:htmlTag value="div" styleClass="pageMenu">
                   <f:subview id="menu">
                        <tiles:insert attribute="menu" flush="false" />
                   </f:subview>
              </t:htmlTag>
              <t:htmlTag value="div" styleClass="pageContentWoMenu">
                   <f:subview id="bodi">
                        <tiles:insert attribute="bodi" flush="false" />
                   </f:subview>
              </t:htmlTag>
              <f:facet name="footer">
                   <f:subview id="footer">
                        <tiles:insert attribute="footer" flush="false" />
                   </f:subview>
              </f:facet>
         </h:panelGrid>
    </t:htmlTag>Maybe you also need to know the tiles config?
    <tiles-definitions>
       <definition name="template" path="/jsf/tileTemplate.jsp">
              <put name="header"  value="/jsf/header.jsp"/>
          <put name="menu"    value="/jsf/menu.jsp"/>
          <put name="bodi"    value="/jsf/bodi.jsp"/>
          <put name="footer"    value="/jsf/footer.jsp"/>
       </definition>
       <definition name="/jsf/news.tiles" extends="template">
              <put name="bodi"  value="/jsf/news.jsp"/>
       </definition>
       <definition name="/jsf/explorer.tiles" extends="template">
              <put name="bodi"  value="/jsf/explorer.jsp"/>
       </definition>
       <definition name="/jsf/tab.tiles" extends="template">
              <put name="bodi"  value="/jsf/tab.jsp"/>
       </definition>If you have read until here: thanks very much.
    There seems to be a sort of gap regarding jsf navigation documentation.
    I mean the ordinary way is covered everywhere (the book I have covers that too), but jscookmenu seems not to fit in too good. I also tried it with an actionslistener in the jscookmenu but that failed, too. So a link to documents telling the truth on jsf navigation I would appreciate very much.
    Kind regards
    Belle Ile En Mer

    This is the error i am getting into now..
    exception
    org.apache.jasper.JasperException: An exception occurred processing JSP page /welcomeJSF.jsp at line 19
    16: This file is an entry point for JavaServer Faces application.
    17: --%>
    18: <body>
    19: <f:view>
    20: <h3><h:outputText value="CHOULTRY'S IN BANGALORE" /></h3>
    21: <h:form>
    22: <table border="0">
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    root cause
    java.lang.RuntimeException: Cannot find FacesContext
         javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
         javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
         org.apache.jsp.welcomeJSF_jsp._jspx_meth_f_005fview_005f0(welcomeJSF_jsp.java:112)
         org.apache.jsp.welcomeJSF_jsp._jspService(welcomeJSF_jsp.java:86)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

  • WS3.2 - "faces" failed to preload - No Factories / StartupServletContextLis

    Hi,
    I have a fairly simple web app that I've created a war for (using Workshop Studio 3.2) and deployed to a WL9.2 server.
    Upon server startup I'm getting the exception defined below. The web.config definately contains the StartupServletContextListener and the application works fine when run via Workshop.
    I've seen a few posts on the net that indicated this was a WLServer 8.1 bug. Is this still a bug? If so - what is the workaround?
    much thanks!
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "faces" failed to preload on startup in Web application: "mywebapp.war".
    java.lang.IllegalStateException: No Factories configured for this Application - typically this is because a context listener is not setup in your web.xml.
    A typical config looks like this;
    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:101)
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:276)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    --- here's my web.xml -----
    <listener>
         <!-- Listener, that does all the startup work (configuration, init). -->
         <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
         </listener>     
         <servlet>
         <!-- Faces Servlet -->
         <servlet-name>faces</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
         </servlet>

    Hi,
    Did you finally resolve your problem ?

  • Failed to preload servlet

    Hi,
              I'm using WLS8.1 sp2. When trying to deploy Stuts based WepApp, The following exception arise:
              <Nov 7, 2004 3:34:01 PM IST> <Error> <HTTP> <BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "DefaultWebApp".
              javax.servlet.ServletException
              at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:906)
              at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3236)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3181)
              at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3154)
              at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:654)
              at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
              at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
              at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
              at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
              at weblogic.Server.main(Server.java:32)
              >
              How can I debug such problem? I couldn't find anything in the log files.
              Thanks,
              Barak.

    MUDE JÁ SUA VIDA LEIA COM ATENÇÃO!!! EU NÃO ACREDITAVA NISSO, MAS
              AGORA EU ME ARREPENDO POR NÃO TER ENTRADO NISSO A MAIS TEMPO! LEIA
              ISSO E GANHE MUITO DINHEIRO!! GANHE MUITO DINHEIRO,!!!! Ganhe muito
              DINHEIRO DE MODO MUITO FÁCIL!!!!! Por favor, leia este texto para
              entender, é muito fácil!! LENDO ISTO VOCÊ PODE MUDAR SUA VIDA!!! (Leva
              menos de 3 minutos).
              Pouco tempo atrás, eu estava olhando mensagens nos fóruns (ou
              newgroups), como você que está fazendo agora, encontrei um artigo
              semelhante a isto descrevendo como eu poderia fazer milhares de reais
              dentro de semanas com apenas um investimento de R$6,00.
              Pensei, "Que fria" Tremenda bobagem". Mas como curioso como a maioria
              de nós brasileiros, continuei lendo. O texto me orientava a enviar R$
              1,00 a cada um dos nomes contidos na lista logo abaixo. Depois de ter
              feito isso, bastaria eliminar o primeiro nome da lista e mandar o
              artigo para pelo menos 200 fóruns ou newsgroups (existem milhares
              deles). Nada mais, só isso e você ganhará muito dinheiro. Assim depois
              de refletir sobre isto, resolvi seguir a risca a orientação do texto.
              Cheguei a seguinte conclusão: "O que eu perderia se abençoasse seis
              pessoas com R$ 1,00 cada e mais as despesas de correio??? Quantas
              vezes eu perdi dinheiro em coisas que jamais usei!!! Aqui pelo menos
              eu estaria sendo útil para as pessoas as quais eu enviei e correndo o
              risco de ganhar muito mais se estivesse concorrendo pela loteria, não
              Ã© verdade?
              Então mãos a obra, nada tenho a perder...mandei os R$ 6,00. Resultado,
              ADIVINHE???... Dentro de 7 dias, comecei a receber dinheiro pelo
              correio! Na primeira semana, recebi aproximadamente R$ 36,00. Ao final
              da terceira semana eu tinha feito um total de mais de R$ 1.000,00! Na
              sexta semana eu tive mais de R$ 9.000,00 e continua chegando e agora
              estou economizando para comprar meu carro... Deixe-me explicar como
              isto funciona e o mais importante, POR QUE funciona... SUGESTÃO: Leia
              e releia esta mensagem inteira cuidadosamente! (imprima e salve). Siga
              as instruções e veja o dinheiro entrar! É fácil. É legal. E seu
              investimento é de R$ 6,00 (mais correio)
              IMPORTANTE: Este não é um golpe, não é indecente, não é ilegal,
              funciona muito nos paÃses de 1º Mundo e foi reportado positivamente
              pela revista EXAME. Funciona mesmo!!!. Se todas as instruções
              seguintes forem cumpridas, seu retorno será bem rápido. ATENÇÃO: Siga
              estas instruções EXATAMENTE, e R$ 10.000 ou mais pode ser seu em 20 a
              60 dias. Este programa continua próspero por causa da HONESTIDADE e
              INTEGRIDADE dos participantes. POR FAVOR continue fazendo com que o
              programa seja um sucesso aderindo cuidadosamente às instruções. Aqui
              estão os 4 passos fáceis para o sucesso:
              * ETAPA 1: Escreva em 6 papéis opacos o seguinte:" INCLUA-ME POR FAVOR
              EM SUA LISTA DE CORRESPONDÊNCIA" (PLEASE ADD ME TO YOUR LIST). E
              coloque o seu nome e endereço logo abaixo. Envolva R$ 1,00 em cada
              papel que você acabou de escrever. Cubra-o com papel escuro para que
              não haja violação, para que ninguém perceba que tem dinheiro no
              interior do envelope, (se possÃvel grampei) Depois, envie cada
              envelope lacrado com o escrito e R$ 1,00 e o seu nome e endereço de
              forma legÃvel para a lista que segue: e envie pelo correio a cada uma
              das 6 pessoas da lista abaixo.
              1 -Renato Gomes - Rua Itapé,182 - Jardim Montevidéu, Campo Grande-MS, Brasil
              CEP: 79035-120
              2- Edenilze Szeyka – Rua Alicio Machado Borba, nº 305 – Araucária /
              PR – Brasil - Cep. 83703-280
              3 – Alda Lorena Lameira- Rua Dona Eloa Do Vale Quadros- 816- Apt-31B-
              Santa Etelvina- São Paulo – SP – Brasil - CEP – 08485-130
              4 -Tiago Campos Colura –Rua Astorga– 222 –Vila Guilhermina– São Paulo–
              SP – Brasil - CEP– 03542-000
              5 - Daniel Nelson da Silva - Rua Noruega 251 cs 04 - Jardim Caiçara -
              Cabo Frio - RJ - Brasil - CEP 28910-220
              6 - Marlene Rodrigues de Jesus - Rua Horácio Neto Obregão 377 - Centro
              Jóia - RS - Brasil - CEP 98180-000 ou Conta Bancária para deposito na Caixa Econômica Federal agência 0483 cta poupança nº 013 00001590-2
              Observação: "Não altere os dados antes de enviar as cartas". Quando
              for fazer a alteração retire somente o numero 1 da lista e acrescente
              o seu embaixo do numero 6, reordene Numericamente, o seu nome passa a
              ser o numero 6 e o que era o ultimo passa a ser 5 e assim
              sucessivamente."
              * ETAPA 2: Quando você mandar R$ 1,00 para cada uma das 6 pessoas da
              lista, você precisa escrever no papel que envolve o dinheiro a frase:
              QUERO QUE O MEU NOME SEJA INCLUÍDO EM SUA LISTA DE CORRESPONDÊNCIA,
              porque esta é a chave do Programa! ISTO É UM SERVIÇO 100% LEGAL, de
              acordo com a legislação dos correios que diz que todo dinheiro
              recebido deve ser trocado por um serviço ou produto. Este é o serviço:
              que o seu nome seja incluÃdo na lista de correspondência da pessoa a
              quem você está enviando R$ 1,00. Entendeu? Após ter mandado R$ 1,00
              para cada uma das 6 pessoas, copie este e-mail para o seu editor de
              texto (Ex: Word, WordPad, etc.), digite uma nova lista de
              participantes, da seguinte forma: tire fora o nome que está no número
              1. Mude os nomes restantes para a posição acima (o número 2 passa a
              ser 1, o 3 passa a ser 2, o 4 passa a ser 3, o 5 passa para o 4 e o 6
              passa para o 5). E aà você coloca o seu próprio nome e endereço no
              número 6.
              *ETAPA 3: Agora, poste seu artigo modificado, tentando manter o mais
              parecido possivel (ou coloque esse meu mesmo) para pelo menos 250
              fórums ou newsgroups (A UOL diz em sua homepage que existem mais de
              20,000 newsgroups, informe-se lá na parte de fórum se você não souber)
              Tudo que você necessita é de 250, mas lembre-se, quanto mais você
              mandar, mais dinheiro você ganhará! (a melhor maneira de postar é
              colocar como tÃtulo, que fica visÃvel pra todos, GANHE DINHEIRO FÁCIL
              ou COMO TRANSFORMAR 6 REAIS EM 6.000 REAIS, e pro conteúdo, selecione
              seu texto no bloco de notas ou wordpad coloque copiar e depois na
              mensagem a ser enviada para os fórums e newgroups coloque colar.
              Simples) Ao invés de postar nos Newgroups, você pode enviar por
              E-mail, envie no mÃnimo 200, lembre-se quanto mais você enviar maior
              será o retorno, adicionar em sua Home Page, etc. Isto é perfeitamente
              legal! Fique com uma cópia destes passos para você e sempre que você
              precisar de dinheiro, você pode usar isto novamente. ( você pode
              encontrar e-mails nos sistemas de Busca Cadê, Altavista,Yahoo,etc)
              ETAPA 4: POR FAVOR, LEMBRE - SE que este programa permanece próspero
              por causa da honestidade e integridade dos participantes e ao
              cumprimento correto das indicações do documento. Olhe isto deste modo.
              Se você for honesto, o dinheiro que tantos outros receberam virá
              também para você, devido à sua contribuição com os R$6.00. NOTA: Você
              pode querer guardar todos os nome e endereços de pessoas que enviaram
              dinheiro a você em um computador ou em cópia no caderno e manter os
              bilhetes enviados. Assim, cada vez que essa mensagem é salva e as
              direções são seguidas cuidadosamente, serão reembolsados seis sócios
              pela participação deles como um Contribuinte na Lista com um real
              cada. Seu nome subirá na lista a cada remessa de forma que quando seu
              nome alcançar a posição #1 você já terá recebido milhares de reais em
              DINHEIRO VIVO!!! Lembre-se que você só investiu R$6.00(R$1.00 para
              cada das primeiras seis pessoas listadas acima). Envie agora os
              envelopes, suba o nome dos participantes e adicione seu próprio nome
              na sexta posição da lista e você está no negócio
              Agora o POR QUE de você receber esse dinheiro: Pessimistamente vamos
              dizer que das 200 mensagens que eu enviei,diga que eu receba só 5
              respostas(um exemplo muito baixo).Então receberei R$5,00 com meu nome
              na posição #6 na carta . Agora,cada uma das 5 pessoas que há pouco me
              enviaram R$1,00 enviam o mais mÃnimo 200 mensagens para outros lugares
              diferentes ,cada uma com o meu nome agora na posição #5 e só 5 pessoas
              respondem a cada uma dessas 5 pessoas (30) pessoas honestamente
              participam de um total de 1.200 mensagens para várias pessoas ,um
              exemplo muito baixo mesmo),isso é mais R$25,00 para mim,agora esses 25
              cada faz 200 postos MÍNIMOS com meu nome na posição #4 e só 5
              respondem para cada um dos 25 que enviaram então,então eu receberei
              mais R$125! Agora,essas 125 pessoas postam o MÍNIMO 200 com meu nome
              na posição #3 e só 5 respondem cada,eu ganharei mais R$626!OK!,agora
              aqui é a parte divertida,cada dessas 625 pessoas posta para um mÃnimo
              200 newgroups diferentes com meu nome e a posição #2 e cada só recebem
              5 retornos.Isso me rende mais R$3.125!!!Essas 3.125 pessoas também vão
              mandar mensagens a 200 newgroups com meu nome na posição #1 e se ainda
              5 pessoas dos 200 newgoups de cada reagem eu receberei R$15.625,00!
              Com um investimento original de só R$6,00!IncrÃvel!Quando seu nome sai
              da lista você só precisa enviar mais R$6,00 e colocar seu nome na
              posição #6 de uma nova mensagem e posta mais 200 mensagens
              novamente.Você deve lembrar que:milhares de pessoas estão entrando na
              internet no Brasil e no mundo inteiro e estão lendo estes artigos
              todos os dias,assim como você !! Você deveria pegar R$6,00 e tentar
              ver se funciona ??eu acho que sim ,umas pessoas disseram:E se isso não
              der o retorno esperado? ''O que são seis reais hoje quando há muito
              mais chance de realmente funcionar .Quais as chances disso acontecer
              quando milhões de pessoas honestas como você estão se juntando a esse
              grupo?\Estima-se que entre 20.000 e 50.000 novas pessoas se juntem á
              Internet todos os dias para os chats e newgroups!
              Estima-se que só no Brasil cerca de 14 milhoes de pessoas entram na
              Internet por dia. As vendas pela Internet subiram em 43% em 2004 em
              relação a 2003. a Internet está virando uma maquina de fazer negocio,
              portanto não perca mais tempo, pois a sua prosperidade é você quem
              faz.!!!
              Boa Sorte! APROVEITE BEM A GRANA QUE IRÁ GANHAR! SE VOCÊ NÃO TIVER
              COMPUTADOR PODERÁ ENVIAR PELO CORREIO PANFLETOS APROVEITE QUANTO MAIS
              ENVIAR MAIS GANHARÁ E AJUDARÁ OUTRAS PESSOAS O MESMO. QUE DEUS O
              ABENÇOE! SEJA HONESTO
              Obs:Milhares de pessoas em todas as partes do mundo participam dessa
              cooperativa,participe você também!!! Esta mensagem é enviada com a
              complacência da nova legislação sobre correio eletrônico, Seção 301,
              Parágrafo (a) (2) (c) Decreto S. 1618, TÃtulo Terceiro aprovado pelo
              "105 Congresso Base das Normativas Internacionais sobre o SPAM". Este
              E-mail não poderá ser considerado SPAM . Um grande abraço!

  • Upgrade from JSF 1.1 to JSF 1.2 (Mojarra and MyFaces) failed.

    Dear all,
    I tried to upgrade from JSF 1.1 to JSF 1.2 but failed. The application starts OK in jsf 1.1 both myfaces and RI, but failed to start using JSF 1.2.
    My environment is as follows.
    - JDK 1.5
    - Tomcat 6.0
    - Facelet
    - JSF Mojarra 1.2
    The error is as follows, occurs when starting tomcat (my application is in context /web)
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_01-b04-FCS) for context '/web'
    Feb 12, 2009 10:39:40 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_01-b04-FCS) for context '/web'
    Feb 12, 2009 10:39:40 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Feb 12, 2009 10:39:40 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context [web] startup failed due to previous errors
    What I have included in WEB-INF/lib are:
    - JSTL 1.2 (standard.jar and jstl.jar)
    - JSF mojarra 1.2 (jsf-api.jar and jsf-impl.jar)
    - Facelets( el-api.jar, el-impl.jar, and jsf-facelet.jar)
    - commons-digester.jar
    - commons-beanutils.jar
    - commons-logging.jar
    - commons-collection.jar
    Documentation that I read from mojarra FAQ states that i need EL, but EL has been included in Facelets.
    Am i missing something? The following is the part of web.xml that i used, maybe useful to locate what i am missing.
    <web-app xmlns="[http://java.sun.com/xml/ns/j2ee]"
    xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance]"
    xsi:schemaLocation="[http://java.sun.com/xml/ns/j2ee] [http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd]"
    version="2.4">
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    <!-- Special Debug Output for Development -->
    <context-param>
    <param-name>facelets.DEVELOPMENT</param-name>
    <param-value>true</param-value>
    </context-param>
    <!-- Optional JSF-RI Parameters to Help Debug -->
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>true</param-value>
    </context-param>
    <!--use this if start using JSF 1.2 -->
    <context-param>
    <param-name>com.sun.faces.injectionProvider</param-name>
    <param-value>com.sun.faces.vendor.GlassFishInjectionProvider</param-value>
    </context-param>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet

    Hi BalusC,
    Thank you for your time answering my question.
    For the first point, you were right. Now I have downloaded the latest Mojarra release.
    As for the case of web.xml, i should mentioned that I have tried declaring it as Servlet API 2.4 and Servlet API 2.5, and still got the error. My web.xml that declares as 2.5 looks as follows:
    <web-app 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/javaeeweb-app_2_5.xsd"
    version="2.5">
    On the third point, maybe i stated my problem in a wrong way. What I meant was, I tried each implementation separately, and both implementation did not work.
    About Glassfish injection, i followed the step in Mojarra FAQ regarding the following error.
    JSF1033: Resource injection is DISABLED
    This error showed when i started tomcat. However, since I use the latest Mojarra release, the message error disappear. I have deleted the "glasshfish injection provider" from web.xml, and the error has disappeared.
    Here's the latest of my tomcat startup messages (after i replaced the Mojarra libraries, declared as servlet 2.5 in web xml, and removed glassfish injection provider from web.xml).
    Feb 18, 2009 9:41:58 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
    Feb 18, 2009 9:41:58 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
    Feb 18, 2009 9:41:59 AM org.apache.coyote.http11.Http11AprProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-80
    Feb 18, 2009 9:41:59 AM org.apache.coyote.ajp.AjpAprProtocol init
    INFO: Initializing Coyote AJP/1.3 on ajp-8009
    Feb 18, 2009 9:41:59 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 772 ms
    Feb 18, 2009 9:41:59 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Feb 18, 2009 9:41:59 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
    Feb 18, 2009 9:42:01 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/web'
    Feb 18, 2009 9:42:01 AM com.sun.faces.config.ConfigureListener contextInitialized
    WARNING: JSF1059: WARNING! The com.sun.faces.verifyObjects feature is to aid developers not using tools. It shouldn''t be enabled if using an IDE, or if this application is being deployed for production as it will impact application start times.
    Feb 18, 2009 9:42:06 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Feb 18, 2009 9:42:06 AM org.apache.catalina.core.StandardContext start
    *SEVERE: Context [web] startup failed due to previous errors*
    Feb 18, 2009 9:42:07 AM org.apache.coyote.http11.Http11AprProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-80
    Feb 18, 2009 9:42:07 AM org.apache.coyote.ajp.AjpAprProtocol start
    INFO: Starting Coyote AJP/1.3 on ajp-8009
    Feb 18, 2009 9:42:07 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 8116 ms
    The application still failed to start.There wasnt enough information for me to digest what is actually went wrong, other than SEVERE: Listener start. And let me say this again, the application starts OK when I used JSF 1.1 (Reference Implementation or MyFaces).
    Anyone has the same experience.?
    Thanks in advance.
    Edited by: niner on Feb 17, 2009 7:11 PM

  • Problem w.r.t. JSF 2.0 with faces-config.xml

    Hi All,
    I am trying to evaluate the features of JSF2.0.
    For that, I have created a very simple application with "JSF 2.0.2".
    There is a page that displays a composite component and some other form related components (inputtext, commandbutton).
    When I deploy my application without any faces-config.xml file, everything renders perfectly fine.
    When I deploy the app with faces-config.xml (even an empty one without any configuration), none of the components get rendered.
    Only the html elements get displayed.
    I need to define some navigation-rules in my config file. I am not sure how to go further from here.
    The app server I am using for deploying my app is GlassFish(v3).
    Any help or pointers towards solving my problem are highly appreciated.
    You can find the xhtml file, etc of my project below.
    Thank you,
    With best regards,
    Praveen
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 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" version="2.5">
         <context-param>
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
              <param-value>.xhtml</param-value>
         </context-param>
         <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.jsf</url-pattern>
         </servlet-mapping>
    </web-app>
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    </faces-config>
    resources->acicomp->namesection.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:composite="http://java.sun.com/jsf/composite">
    <composite:interface>
    </composite:interface>
    <composite:implementation>
         <h:panelGroup>
         <h:panelGrid columns="2">
              <h:outputText value="Name: "/>
              <h:inputText value="myName"/>
              <h:outputText value="Company: "/>
              <h:inputText value="myComp"/>
         </h:panelGrid>
         </h:panelGroup>
    </composite:implementation>
    </html>
    index.xhtml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:aci="http://java.sun.com/jsf/composite/acicomp">
    <h:head>
         <title>JSF Test Program</title>
    </h:head>
    <h:body>
         <p>My Simple Test Program</p>
            <h:form id="testForm" >
                <p>TEST</p>
                <aci:namesection></aci:namesection>
                <h:inputText id="username" value="John" />
                <h:commandButton id="submit" action="response" value="Submit"/>
            </h:form>
    </h:body>
    </html>

    I found the problem.
    The dtd location of the faces-config.xml had to be changed. It was pointing to the schema of 1.1.
    With the following faces-config.xml, my application worked perfectly fine.
    <?xml version="1.0"?>
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
                  version="2.0">             
    </faces-config>

  • Exception thrown by servlet Faces Servlet in WAS ND 6.1.0.13

    Hi,<br>
    I'm using WebSphere Application Server Network Deployment (WAS ND) v. 6.1.0.13.<br><br>
    I'm getting this error when I try to launch my application:<br><br>
    [1/24/08 11:41:44:100 WET] 0000003c ServletWrappe E SRVE0100E: Did not realize init() exception thrown by servlet Faces Servlet: java.lang.NullPointerException<br>
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)<br>
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:190)<br>
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:317)<br>
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:346)<br>
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)<br>
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)<br>
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)<br>
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)<br>
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)<br>
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)<br>
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)<br>
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)<br>
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)<br>
    at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)<br>
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:556)<br>
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:606)<br>
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:979)<br>
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1064)<br>
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)<br>
    <br><br><br>
    After doing a search I tried this following steps:<br>
    � Delete the entry in web.xml:<br>
    <listener><br>
    <listener-class><br>
    com.sun.faces.config.ConfigureListener<br>
    </listener-class><br>
    </listener><br><br>
    � Update my log4j version<br><br>
    � Delete the commons-logging.jar from WEB-INF directory<br>
    These are the jar files included in WEB-INF directory:<br>
    commons-beanutils.jar<br>
    commons-collections.jar<br>
    commons-digester.jar<br>
    commons-javaflow-20060411.jar<br>
    commons-logging.jar<br>
    FglConnectorClient.jar<br>
    itext-1.4.2.jar<br>
    jasperreports-1.2.3.jar<br>
    jcommon-1.0.0.jar<br>
    jfreechart-1.0.1.jar<br>
    jsf-api.jar<br>
    jsf-ibm.jar<br>
    jsf-impl.jar<br>
    jstl.jar<br>
    log4j-1.2.14.jar<br>
    standard.jar<br>
    struts.jar<br>
    <br><br>
    <br>
    None of the suggestions worked.<br><br>
    Then I tried to deploy my application in another WAS ND 6.1.0.13 and it worked!!! <br>
    What can I do so solve this problem in my WAS ND 6.1.0.13? What could be the problem?<br><br>
    Thanks,<br>
    Nuno

    Did you find a solution to this problem
    please help
    Thanks & Regards
    Nasir

  • ADF Bindings Servlet/Filter  not invoking  Faces Servlet

    I'm getting ADF Faces and Facelets working properly with pages written in jspx format, but the Faces Servlet being mapped to jsf format.
    The problem I'm getting is while displaying ADF Tables with data retrieved from the database using Toplink and bindings provided by ADF Databindings.
    The following is the Web.xml mappings for Faces Servlet and ADF bindings filter:
    <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>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <filter>
    <filter-name>adfBindings</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    I'm getting the ADF tables displayed using ADF Bindings, if the faces servlet is mapped for jspx format;but, at the cost of losing Facelets...Facelets is not working with Faces Servlet mapped to jspx format(though written in jspx format, the faces servlet mappping has to be made for jsf format.On the other hand, if I use faces servlet mapping for jsf pages I'm getting Facelets working but ADF Databindings are not working ,(I guess) and hence ADF Faces Tables are not being displayed(I'm getting Access Denied message).
    I even tried to change the ADF binding filter mappings
    ---- from ---- jsp &jspx---- to ----- jsp and jsf ----
    But I got the same Access denied message.
    I read a similar post on this forum by Mr.Ashish Kumar who said he is using java script and automatic form submission, to refresh the page and that gave him the table working.
    as quoted in the post:
    af:table displays Access Denied
    Why should the page be refreshed at all. I Guess , the Faces Servlet is not being invoked by the ADF Bindings Filter/Servlet, and for this , I suppose , Mr.Ashish is using java script to provide the action required.
    And one more thing which that Automatic Refreshing of page using JavaScript cannot do.
    Suppose,
    I need customised display, rather than just a Table or Form,like:
    public String getEmp() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("findAllEmp");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    List<Emp> res=(List<Emp>)result;
    for(int i=0;i<res.size();i++)
    Emp myrec=res.get(i);
    System.out.println("Employee ["+myrec.getEname()+"], Salary ["+myrec.getSal()+"]");
    return "";
    where I do some customisation in the backing bean.
    and I call that method binded to a button as below:
    <af:commandButton
    text="findAllEmp"
    disabled="#{!bindings.findAllEmp.enabled}"
    binding="#{backing_Success.commandButton1}"
    id="commandButton1"
    action="#{backing_Success.getEmp}"/>
    What I'm getting is a disabled button.
    Why doesn't ADF bindings servlet invoke the faces Servlet?
    Can't we make ADF Bindings Servlet invoke Faces Servlet by configuring in the web.xml?
    Can't we get ADF Bindings filter mapped to work with jsf pages?
    Won't ADF Bindings work with jsf pages, will they work only with jspx pages?
    ADF Team,
    Please Help me.
    Thanking you,
    Samba

    Hi! Frank,
    Thankyou for your Reply.
    Yes, Mr.Adam Winer has contributed that library, I guess.
    But I already have that adf-facelets.jar in my lib folder ; and with out that the Facelets won't work with ADF faces , in the first place.
    I'm getting Facelets working excellently with ADF Faces but I'm not getting ADF Bindings working with Faceletpages.
    The thing is even in another application which does not have facelets in it, if we use mapping for jsf pages, ADF Bindings are not working.
    I think the ADF bindings filter is configured some where to work with jspx pages only.Could you tell me where to change that entry to make ADF Bindings work with jsf extension?
    Thanking you,
    Samba.

  • JSF Deployment error - login.faces not available

    I am new to JSF and am having deploying my first example JSF pages in Eclipse on default Tomcat (6.x).
    I feel I have done everything stated in the tutorial http://www.exadel.com/tutorial/jsf/jsftutorial-kickstart.html (I did not repeat the step by step instructions in the tutorial - instead, used these instructions to create my own pages / logic). However, I still get the following error:
    HTTP Status 404 - /reportwriter/pages/login.faces
    type Status report
    message /reportwriter/pages/login.faces
    description The requested resource (/reportwriter/pages/login.faces) is not available.
    Here is my directory structure:
    reportwriter
    - src
    - LoginBean
    - LoginServer.java
    - Resources.properties
    - js
    - html
    - images
    - pages
    - login.jsp
    - webRoot
    - WEB-INF
    - lib
    - faces-config.xml
    - web.xml
    - index.jsp with a one line jsp forward to pages/login.faces
    here is my faces-config.xml
    <?xml version="1.0"?>
    <!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>
    <application>
    <message-bundle>LoginBean.Resources</message-bundle>
    <locale-config>
    <default-locale>en</default-locale>
    <supported-locale>en-us</supported-locale>
    <supported-locale>fr</supported-locale>
    <supported-locale>es</supported-locale>
    </locale-config>
    <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
    </application>
    <navigation-rule>
    <from-view-id>/pages/login.jsp</from-view-id>
    <navigation-case>
    <description>Handle case for successful login</description>
    <from-action>#{loginServer.loginAction}</from-action>
    <from-outcome>success</from-outcome>
    <to-view-id>/pages/task.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <description>Handle case for unsuccessful login</description>
    <from-action>#{loginServer.loginAction}</from-action>
    <from-outcome>failure</from-outcome>
    <to-view-id>/pages/failure.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/pages/success.jsp</from-view-id>
    <navigation-case>
    <from-outcome>return</from-outcome>
    <to-view-id>/pages/login.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/pages/failure.jsp</from-view-id>
    <navigation-case>
    <from-outcome>return</from-outcome>
    <to-view-id>/pages/login.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>loginServer</managed-bean-name>
    <managed-bean-class>LoginBean.LoginServer</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    </faces-config>
    and here 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.STATE_SAVING_METHOD</param-name>
    <param-value>server</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.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    <!-- Faces Servlet -->
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    </web-app>
    Can you think what I may be missing here to get the login.faces not available error?
    One hint I have is - if I do not set a jsp forward line in the index.jsp file, I get the server deployment for the index.jsp file OK. But not when I have the forward from index.jsp to /pages/login.faces
    I also tried setting the context in tomcat server.xml file as follows:
    <Context debug="0"
    docBase="C:/evsapi/ReportWriter/reportwriter/WebRoot"
    path="/LoginBean" reloadable="true"/>
    Still no use.
    Please help!
    Edited by: tipseeker on Dec 1, 2008 3:51 PM

    tipseeker wrote:
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    I highly recommend your to stop with this and restart with JSF 1.2 instead. JSF 1.0 is legacy and may have still some nasty bugs. You may find this JSF 1.2 / Eclipse 3.4 / Tomcat 6.0 startup tutorial useful as well: [http://balusc.blogspot.com/2008/01/jsf-tutorial-with-eclipse-and-tomcat.html]
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>There's the root cause of the problem, I think. Why did you add this? Are you using JSP or Facelets? This configuration is typical for Facelets, but in your remaining code I only see JSP's being mentioned.

  • JSF 1.0 final release problem.

    My application was working when I was using the beta release. (with the old tag like input_text)
    I downloaded the JSF 1.0 final release from Sun and everything stopped working.
    The funny part is the the samples in the fina release are working. However, they are using the old jar files!!! The jsf-impl.jar inside the samples is different from the one inside the jsf-1_0/lib directory. How can we follow those samples???
    When I tried to use the jsf-impl.jar inside the sample application, my application gave me the famous NullPointerException when the listener ConfigLister is initialized.
    When I tried to use the jsf-1_0/lib/jsf-impl.jar inside the lib directory, my application gave me:
    org.apache.jasper.JasperException: Error setting property 'description' in bean of type null
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    Looks like my bean is not found. Has anyone seen this before? I got the same error when I tried to move an application from Java Creator to tomcat.
    I am using tomcat 4.1.29
    Someone from Sun please fix the samples inside th final release.

    Thanks.
    The second exception is gone. It ends up to be I am using binding instead of value for one attribute inside my jsp.
    Still, it's so confusing to have the older version implementtion inside the samples for final release.
    In the old verion, it's called ConfigListener and the version called ConfigureListener.

Maybe you are looking for