Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- Newbie Help. Do I have SEAM deployed?

- Newbie Help. Do I have SEAM deployed?

2007-08-08       - By birwin

 Back
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:
<faces-config>

 
    <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
 
</faces-config>

web.xml file:
<web-app>
  <!-- Listeners -->
 
    <!-- Seam -->
    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
 
 
    <!-- JSF -->
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
 

  <!-- Faces Servlet -->
 
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet Source code of javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
 
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>

 
    <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
    <taglib-location>/WEB-INF/jsf_core.tld</taglib-location>
 
 
    <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
    <taglib-location>/WEB-INF/html_basic.tld</taglib-location>
 
 
    <taglib-uri>http://java.sun.com/jsp/jstl/core </taglib-uri>
    <taglib-location>/WEB-INF/c.tld</taglib-location>
 

</web-app>

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


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


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

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

@(protected)(ScopeType.CONVERSATION)
@(protected)("test")
public class Test
{
   private String text = "hello";

   public String getText()
   {
       return text;
   }

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




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4072245#4072245

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4072245
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.