title: Sevlet objects are not being recognized
body: <p>I am using Eclipse Java EE IDE for Web Developers - Version: <code>Neon.1a Release (4.6.1)</code> - Build id: <code>20161007-1200</code> with Tomcat <code>apache-tomcat-8.0.38</code> I am trying to implement some jsf example project but I am facing problem that the Servlet objects are not being identified. I configured server Tomcat v.8.0 and in <em>Windows -> preference -> server -> runtime environment</em> I have this tomcat version too. What else should I do to work with the servlets?</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>package at.irian.jsfatwork.gui.page;
  
  import java.io.IOException;
  import java.io.PrintWriter;
  
  import javax.faces.context.FacesContext;
  import javax.faces.event.ValueChangeEvent;
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.SessionScoped;
  
  
  /*
   * customer profile
   */
  @ManagedBean
  @SessionScoped
  public class Customer {
      private String firstName;
      private String lastName;
      private Boolean useCreditCard = Boolean.FALSE;
      private String creditCardType;
      private String creditCardNumber;
  
      public String getFirstName() {
          return firstName;
      }
  
      public void setFirstName(String firstName) {
          this.firstName = firstName;
      }
  
      public String getLastName() {
          return lastName;
      }
  
      public void setLastName(String lastName) {
          this.lastName = lastName;
      }
  
      public Boolean getUseCreditCard() {
          return useCreditCard;
      }
  
      public void setUseCreditCard(Boolean useCreditCard) {
          this.useCreditCard = useCreditCard;
      }
  
      public String getCreditCardType() {
          return creditCardType;
      }
  
      public void setCreditCardType(String creditCardType) {
          this.creditCardType = creditCardType;
      }
  
      public String getCreditCardNumber() {
          return creditCardNumber;
      }
  
      public void setCreditCardNumber(String creditCardNumber) {
          this.creditCardNumber = creditCardNumber;
      }
  
      public String save() {
          return "/showCustomer.xhtml";
      }
  
      public void useCreditCardChanged(ValueChangeEvent ev) {
          Boolean useCreditCard = (Boolean) ev.getNewValue();
          if (useCreditCard != null) {
              this.useCreditCard = useCreditCard;
          }
          FacesContext.getCurrentInstance().renderResponse();
      }
  
      public String export() {
          FacesContext fc = FacesContext.getCurrentInstance();
          try {
              // Get writer from servlet context, this won't work with portlets! 
            //I can not imported the HttpServletResponse here?
              HttpServletResponse response = (HttpServletResponse)fc.getExternalContext().getResponse();
              // Set content type to plain text
              response.setContentType("text/plain");
              // Get writer and print data
              PrintWriter writer = response.getWriter();
              writer.print("First Name: ");
              writer.println(firstName);
              writer.print("Last Name: ");
              writer.println(lastName);
              if (useCreditCard) {
                  writer.print("Credit Card Type: ");
                  writer.println(creditCardType);
                  writer.print("Credit Card Number: ");
                  writer.println(creditCardNumber);
              }
              // Skip further lifecycle processing
              fc.responseComplete();
          } catch (IOException e) {
              e.printStackTrace();
          }
          return null;
      }
  
  }
  </code></pre>