Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8537283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:51:53+00:00 2026-06-11T10:51:53+00:00

I would like to development an simple application using the following envirnoment. JBoss 7.1.1

  • 0

I would like to development an simple application using the following envirnoment.

  1. JBoss 7.1.1
  2. JBoss Seam 2.3
  3. JSF 2.0
  4. Rifaces 4.0
  5. Spring 3.0
  6. JPA 2.0
  7. Eclipse IDE with JBoss Tool 3.2

Most of the configuration properly work. But I cannot inject the Spring Bean from Seam Action Bean. There is no error and exception when page is loaded. My Data table is

In web.xml,

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>jsf-seam</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.seam</url-pattern>
  </servlet-mapping>
  <context-param>
    <param-name>org.richfaces.skin</param-name>
    <param-value>blueSky</param-value>
  </context-param>
  <listener>
    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  </listener>
  <filter>
    <filter-name>Seam Filter</filter-name>
    <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>Seam Filter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <servlet>
    <servlet-name>Seam Resource Servlet</servlet-name>
    <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>Seam Resource Servlet</servlet-name>
    <url-pattern>/seam/resource/*</url-pattern>
  </servlet-mapping>
  <context-param>
    <param-name>facelets.DEVELOPMENT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
  </context-param>
  <security-constraint>
    <display-name>Restrict raw XHTML Documents</display-name>
    <web-resource-collection>
      <web-resource-name>XHTML</web-resource-name>
      <url-pattern>*.xhtml</url-pattern>
    </web-resource-collection>
    <auth-constraint/>
  </security-constraint>
</web-app>  

In faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">
    <application>
        <locale-config>
            <default-locale>en</default-locale>
        </locale-config>
    </application>
</faces-config>

In component.xml;

<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.org/schema/seam/components"
            xmlns:core="http://jboss.org/schema/seam/core"
            xmlns:persistence="http://jboss.org/schema/seam/persistence"
            xmlns:drools="http://jboss.org/schema/seam/drools"
            xmlns:bpm="http://jboss.org/schema/seam/bpm"
            xmlns:security="http://jboss.org/schema/seam/security"
            xmlns:mail="http://jboss.org/schema/seam/mail"
            xmlns:web="http://jboss.org/schema/seam/web"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:spring="http://jboss.com/products/seam/spring"
            xsi:schemaLocation=
                "http://jboss.org/schema/seam/core http://jboss.org/schema/seam/core-2.3.xsd
                 http://jboss.org/schema/seam/persistence http://jboss.org/schema/seam/persistence-2.3.xsd
                 http://jboss.org/schema/seam/drools http://jboss.org/schema/seam/drools-2.3.xsd
                 http://jboss.org/schema/seam/bpm http://jboss.org/schema/seam/bpm-2.3.xsd
                 http://jboss.org/schema/seam/security http://jboss.org/schema/seam/security-2.3.xsd
                 http://jboss.org/schema/seam/mail http://jboss.org/schema/seam/mail-2.3.xsd
                 http://jboss.org/schema/seam/web http://jboss.org/schema/seam/web-2.3.xsd
                 http://jboss.org/schema/seam/components http://jboss.org/schema/seam/components-2.3.xsd">

   <core:init debug="true" jndi-pattern="@jndiPattern@"/>
   <spring:context-loader config-locations="classpath:spring-bean.xml"/>
   <core:manager concurrent-request-timeout="500"
                 conversation-timeout="120000"
                 conversation-id-parameter="cid"
                 parent-conversation-id-parameter="pid"/>

   <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
   <web:hot-deploy-filter url-pattern="*.seam"/>

   <!-- If you are still using JBoss 4, uncomment this to have your PU started -->
<!--   <persistence:entity-manager-factory name="entityManagerFactory"-->
<!--                      persistence-unit-name="jsf-seam"/>-->
   <!-- If you are still using JBoss 4, uncomment this to have the entityManagerFactory ysed -->
<!--   <persistence:managed-persistence-context name="entityManager" auto-create="true"-->
<!--                          entity-manager-factory="#{entityManagerFactory}"/>-->

   <persistence:managed-persistence-context name="entityManager" auto-create="true"
                           persistence-unit-jndi-name="java:/jsf-seamEntityManagerFactory"/>

   <drools:rule-base name="securityRules">
      <drools:rule-files><value>/security.drl</value></drools:rule-files>
   </drools:rule-base>

   <security:rule-based-permission-resolver security-rules="#{securityRules}"/>

   <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>

   <event type="org.jboss.seam.security.notLoggedIn">
      <action execute="#{redirect.captureCurrentView}"/>
   </event>
   <event type="org.jboss.seam.security.loginSuccessful">
      <action execute="#{redirect.returnToCapturedView}"/>
   </event>

   <mail:mail-session host="localhost" port="25"/>

   <!-- For use with jBPM pageflow or process management -->
   <!--
   <bpm:jbpm>
      <bpm:process-definitions></bpm:process-definitions>
      <bpm:pageflow-definitions></bpm:pageflow-definitions>
   </bpm:jbpm>
   -->

</components>

In my Seam Action Bean;

@Scope(CONVERSATION)
@Name("ManageDepartmentBean")
public class ManageDepartmentBean implements Serializable {
    private static final long serialVersionUID = -4373053763864526454L;

    @Out(value = "departmentList")
    public List<Department> departmentList;

        public List<Department> getDepartmentList() {
            return departmentList;
        }   

    @In("#{DepartmentService}")
    private IDepartmentService departmentService;

    @Begin
    public String begin() {
        departmentList = departmentService.findAllDepartments();
        return "success";
    }


    public String increment() {
        return "success";
    }


    @End
    public String end() {
        return "home";
    }
}

In my Spring bean;

@Service(value = "DepartmentService")
public class DepartmentService implements IDepartmentService{
    @Resource(name = "DepartmentDAO")
    private IDepartmentDAO departmentDAO;

    @Transactional(propagation = Propagation.REQUIRED)
    public List<Department> findAllDepartments() {
        return departmentDAO.findAll();
    }
}

I also try to used as below in web.xml, but it does not work.

  <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:spring-beans.xml</param-value>
  </context-param>
  <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

in my page;

    <rich:dataTable value="#{ManageDepartmentBean.departmentList}" var="dep" id="departmentTable">
        <rich:column sortBy="#{dep.id}">
            <f:facet name="header">
                <h:outputText value="Department ID"/>
            </f:facet>
            <h:outputText value="#{dep.id}" />
        </rich:column>
        <rich:column sortBy="#{dep.name}">
            <f:facet name="header">
                <h:outputText value="Name"/>
            </f:facet>
            <h:outputText value="#{dep.name}" />
        </rich:column>
        <rich:column sortBy="#{dep.description}">
            <f:facet name="header">
                <h:outputText value="Description"/>
            </f:facet>
            <h:outputText value="#{dep.description}}" />
        </rich:column>
    </rich:dataTable>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:51:54+00:00Added an answer on June 11, 2026 at 10:51 am

    I get to inject spring bean from seam action bean using @In annotation. There is no need to do configuration for seam component into spring-bean.xml or applicationContext.xml.

    In web.xml

     <context-param>
          <param-name>contextConfigLocation</param-name>
          <param-value>classpath:spring-beans.xml</param-value>
      </context-param>
      <listener>
          <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
    

    In faces-config.xml

    <application>
        <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>   
    </application>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create my Kinect development environment and am contemplating using iMac
I am new to this iPhone development.I would like to create a hybrid application
I would like to have a portable android development environment that I could take
I would like to create a template for new stored procedures for our development
I would like to know how much time (in percent) does JavaScript development takes
Let say I would like to set nested style for development and compressed for
I'm new in web development and would like to add a feature to a
I am writing some development management tools in C# and would like to hear
I'm learning VIM for Rails development and would like to easily navigate methods in
I've nearly finished the development of a project and would like to test its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.