title: @Named annotation not working
body: <p>I'm having some problems using the <code>@Named</code> annotation. For example the following bean works correctly, it receives and uploaded file:</p>
  
  <pre><code>@ManagedBean
  @RequestScoped
  public class Bean {
  private UploadedFile uploadedFile;
  
  public void submit() throws IOException {
      String fileName = FilenameUtils.getName(uploadedFile.getName());
      String contentType = uploadedFile.getContentType();
      byte[] bytes = uploadedFile.getBytes();
  
      // Now you can save bytes in DB (and also content type?)
  
      FacesContext.getCurrentInstance().addMessage(null, 
          new FacesMessage(String.format("File '%s' of type '%s' successfully uploaded!", fileName, contentType)));
  }
  
  public UploadedFile getUploadedFile() {
      return uploadedFile;
  }
  
  public void setUploadedFile(UploadedFile uploadedFile) {
      this.uploadedFile = uploadedFile;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>However if I replaces the <code>@ManagedBean</code> and <code>@RequestedScope</code> with <code>@Named</code> and <code>@RequestScoped</code> it fails with this exception:</p>
  
  <blockquote>
    <p>javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bean' resolved to null</p>
  </blockquote>
  
  <p>I know <code>@Named</code> do I have an incorrect version set in my Netbeans project or something along those lines? I'm deploying on a Glassfish 4 server too.</p>
  
  <p>Thanks</p>