5 Replies Latest reply on Aug 9, 2007 2:10 PM by birwin

    Newbie Help. Do I have SEAM deployed?

    birwin Newbie

      I started fiddling with SEAM (2.0.0BETA1) today, but I don't think I have installed it correctly (Installing on JBoss 4.2.1.GA).

      I am unable to display data in my UI (Its a JSP). Each time I load the web page, the input field is empty, but my backing bean has data. The backing bean has a value assigned to its property on instantiation (See the java code below). If I add a "managed-bean" entry to my faces-config.xml, it works fine and the number appears in my input field. I thought I did not need "managed-bean" entries in my faces-config.xml file if I was using SEAM. From my searches on the Internet, it appears that I am not using SEAM, but the plain JSF. I have deployed the Seam JAR file in the WEB_INF/lib directory of my war file. Attached are my faces-config, web.xml, JSP and Java class files.

      My java class has the Name and Scope annotations, and I have included the phase-listener entry in my faces-config.xml file in addition to including the listener-class entry in my web.xml file. When I deploy to my JBoss server, it appears SEAM kicks in. I see row after row of "INFO [Component] Component: org.jboss.web.session, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.web.Session" type messages.

      Any ideas what I did wrong?

      faces-config.xml file:



      web.xml file:
      <!-- Listeners -->

      <!-- Seam -->

      <!-- JSF -->

      <!-- Faces Servlet -->

      <servlet-name>Faces Servlet</servlet-name>

      <servlet-name>Faces Servlet</servlet-name>



      <taglib-uri>http://java.sun.com/jsp/jstl/core </taglib-uri>


      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

      <h:inputText value="#{test.text}" />

      Test Java Class:
      import org.jboss.seam.ScopeType;

      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Scope;

      public class Test
      private String text = "hello";

      public String getText()
      return text;

      public void setText(String text)
      this.text = text;