troubleshooting Question

JSF example issues

Avatar of gudii9
gudii9Flag for United States of America asked on
JavaJSPJava EE
13 Comments1 Solution878 ViewsLast Modified:
Hi,

I am trying below JSF example from link

http://www.vogella.com/articles/JavaServerFaces/article.html


I do not see managed bean tab when i double click on the faces config. Do i need to enable anything to see it. I only see 3 tabs
1.Diagram
2.Tree
3. Source

When i click the Diagram and go to outline there are options like

Application, Factory, lifeCycle, Components, Converters,Manageed Beans(with right click option), Navigation Rules, Referred Beans, Render Kits, Validators, Extenstons. Not sure what they are for .

When i run the first application getting below error

Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config


do i need to have jstl-1.2.jar apart from jstl-api.1.2.jar, jstt-impl.1.2.jar and where i have to put them in
Build path?
or under
web-inf/lib
or both places
or some oher place and what is the difference in putting in these differenc palces.


I put three jars in java build path then user libraries and then copied to web-inf/lib folder still getting error as below

Sep 11, 2013 12:30:46 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.6.0_41\bin;C:\software\eclipse-jee-juno-SR1-win32\eclipse;;.
Sep 11, 2013 12:30:47 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:de.vogella.jsf.first' did not find a matching property.
Sep 11, 2013 12:30:47 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 11, 2013 12:30:47 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 762 ms
Sep 11, 2013 12:30:47 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 11, 2013 12:30:47 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.37
Sep 11, 2013 12:30:47 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
Sep 11, 2013 12:30:47 PM org.apache.myfaces.webapp.StartupServletContextListener dispatchInitializationEvent
INFO: Checking for plugins:org.apache.myfaces.FACES_INIT_PLUGINS
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value false
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS' found, using default value false
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value false
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value true
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value true
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getLongInitParameter
INFO: No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig createAndInitializeMyFacesConfig
INFO: Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
Sep 11, 2013 12:30:47 PM org.apache.myfaces.shared_impl.config.MyfacesConfig createAndInitializeMyFacesConfig
INFO: Starting up Tomahawk on the MyFaces-JSF-Implementation
Sep 11, 2013 12:30:47 PM org.apache.myfaces.config.FacesConfigurator feedStandardConfig
INFO: Reading standard config META-INF/standard-faces-config.xml
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator feedWebAppConfig
INFO: Reading config /WEB-INF/faces-config.xml
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: Starting up MyFaces-package : myfaces-api in version : 1.2.9 from path : file:/C:/Users/ganesha/eclipseJuno_workspace/ljn_servletsJsp/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/de.vogella.jsf.first/WEB-INF/lib/myfaces-api-1.2.9.jar
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: Starting up MyFaces-package : myfaces-impl in version : 1.2.9 from path : file:/C:/Users/ganesha/eclipseJuno_workspace/ljn_servletsJsp/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/de.vogella.jsf.first/WEB-INF/lib/myfaces-impl-1.2.9.jar
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk12 not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk-sandbox not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk-sandbox12 not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk-sandbox15 not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : myfaces-orchestra-core not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : myfaces-orchestra-core12 not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : trinidad-api not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : trinidad-impl not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tobago not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : commons-el not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : jsp-api not found.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.shared_impl.util.LocaleUtils toLocale
WARNING: Locale name in faces-config.xml null or empty, setting locale to default locale : en_US
Sep 11, 2013 12:30:48 PM org.apache.myfaces.config.FacesConfigurator handleSerialFactory
INFO: Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
Sep 11, 2013 12:30:48 PM org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
INFO: ServletContext 'C:\Users\ganesha\eclipseJuno_workspace\ljn_servletsJsp\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\de.vogella.jsf.first\' initialized.
Sep 11, 2013 12:30:48 PM org.apache.myfaces.webapp.StartupServletContextListener dispatchInitializationEvent
INFO: Checking for plugins:org.apache.myfaces.FACES_INIT_PLUGINS
Sep 11, 2013 12:30:48 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 11, 2013 12:30:48 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Sep 11, 2013 12:30:48 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/42  config=null
Sep 11, 2013 12:30:48 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1388 ms
Sep 11, 2013 12:30:49 PM javax.faces.webapp._ErrorPageWriter handleThrowable
SEVERE: An exception occurred
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:335)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:187)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
      ... 16 more



After more debugging getting errors like
 javax.servlet.ServletException: javax.servlet.jsp.JspException: java.io.IOException: Illegal to flush within a custom tag

Document root element "faces-config", must match DOCTYPE root "null".

Please advise. Any ideas, sample code, resources highly appreciated. Thanks in advance.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros