title: Tag Library supports namespace: http://xmlns.jcp.org/jsf/core, but no tag was defined for name: selectedOneMenue
body: <p>I am trying to test the working of the<code>f:selectedOneMenue</code> tag but when running the code on the server I am getting the error underneath.</p>
  
  <p>I just want to show the content of the <code>food</code> arrayList in the ContactBeanTwo as a select button so that the user can select some of the item. As a result, the item will show in the message area underneath. </p>
  
  <p>How can I manage it to work?</p>
  
  <p>I appreciate any help.</p>
  
  <p><strong>error</strong></p>
  
  <pre><code>2016-07-09T17:57:15.656+0200|Warnung: StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
  javax.faces.view.facelets.TagException: /index49_select_tags.xhtml @19,58 &lt;f:selectedOneMenue&gt; Tag Library supports namespace: http://xmlns.jcp.org/jsf/core, but no tag was defined for name: selectedOneMenue
      at com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:311)
      at com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:266)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
      at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:745)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:380)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2787)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
      at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:454)
      at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:430)
      at com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:124)
      at com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:481)
      at com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100(DefaultFaceletFactory.java:106)
      at com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:199)
      at com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:197)
      at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:86)
      at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:81)
      at com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:114)
      at com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:124)
      at com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:63)
      at com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:295)
      at com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:239)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:1000)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p><strong>idex.xhtml</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="htpp://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core"&gt;
  
  
  
  &lt;ui:composition template="/WEB-INF/templates/template.xhtml"&gt;
      &lt;ui:define name="css"&gt;
          &lt;h:outputStylesheet library="css" name="mainStlye.css" /&gt;
      &lt;/ui:define&gt;
  
      &lt;!-- to override the content of the content div --&gt;
      &lt;ui:define name="content"&gt;
          &lt;h:form id="login-form" prependId="false"&gt;
  
              &lt;f:selectedOneMenue value="#{contactBeanTwo.favfood}"&gt;
                  &lt;f:selectItems value="#{contactBeanTwo.food}"/&gt;
              &lt;/f:selectedOneMenue&gt;
              &lt;h:commandButton  value="Submit" actionListener="#{contactBeanTwo.selectedOneMenuMethod()}"/&gt;
  
          &lt;/h:form&gt;
  
          &lt;h1&gt;
          &lt;h:outputLabel value="#{contactBeanTwo.foodMsg}" rendered="#{not empty contactBeanTwo.foodMsg}" /&gt; 
          &lt;/h1&gt;
  
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>ContenBeanTow</strong></p>
  
  <pre><code>package com.beans;
  
  import java.util.Arrays;
  import java.util.List;
  
  import javax.annotation.PostConstruct;
  import javax.enterprise.context.RequestScoped;
  import javax.inject.Named;
  
  @Named("contactBeanTwo")
  @RequestScoped
  public class ContactBeanTwo {
  
      private String foodMsg;
      private String favfood;
      private List&lt;String&gt; food;
  
      @PostConstruct
      public void init() {
          food = Arrays.asList("Hot Dogs", "Hamburgers", "Pizza");
  
      }
  
      public String getFoodMsg() {
          return foodMsg;
      }
  
      public void setFoodMsg(String foodMsg) {
          this.foodMsg = foodMsg;
      }
  
      public String getFavfood() {
          return favfood;
      }
  
      public void setFavfood(String favfood) {
          this.favfood = favfood;
      }
  
      public List&lt;String&gt; getFood() {
          return food;
      }
  
      public void setFood(List&lt;String&gt; food) {
          this.food = food;
      }
  
      public void selectedOneMenuMethod() {
          switch (favfood) {
          case "Piza":
              foodMsg = "Love Pizza!";
              break;
  
          case "Hot Dogs":
              foodMsg = "Love hot dogs!";
              break;
  
          case "Hamburgers":
              foodMsg = "Love Hamburgers!";
              break;
          }
      }
  
  }
  </code></pre>