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 8558959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:55:48+00:00 2026-06-11T15:55:48+00:00

I have some difficulties deploying my web app on JBoss AS 6.1. My current

  • 0

I have some difficulties deploying my web app on JBoss AS 6.1. My current Project is separated into the main web app (controller/managed beans & web frontend using JSF 2 facelets) and one jar with the composite components + backing beans. But when I try to access the page I got an error that the specified component type could not be instantiated.

Copying the backing bean into the main web app solves the problem, but this isn’t what I want. So is there anything to pay attention to?

The backing bean looks like

@FacesComponent(value = "elementBase")
public class ElementBase extends UINamingContainer {
    ...
}

and the composite components interface

<composite:interface componentType="elementBase">
... some attributes
</composite:interface>

The structure of the jar is the following

-- META-INF
    |-- resources
    |    |-- components
    |         |-- elementBase.xhtml
-- com
    |-- example
    |    |-- ElementBase.class

I’ve also tried to add faces-config.xml within META-INF folder, with the component type, but the component type was still not found.

  • 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-11T15:55:49+00:00Added an answer on June 11, 2026 at 3:55 pm

    Through the BalusC’s answer to the question JEE6> Packaging JSF facelets (xhtml) and ManagedBeans as JAR

    As to the managed beans and other JSF classes like validators, converters, etc, just annotate them with @ManagedBean, @FacesValidator, @FacesConverter, etc and package them in the JAR the usual way. You only need to provide a JSF 2.0 compatible /META-INF/faces-config.xml file in the JAR.

    <?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">
    </faces-config>
    

    This way JSF will be triggered to scan the classes in the JAR for JSF specific annotations. Alternatively you can also just register them in the JAR’s faces-config.xml the JSF 1.x way.

    and Java EE6 Tutorial: Application Configuration Resource File

    You can have more than one application configuration resource file for an application. The JavaServer Faces implementation finds the configuration file or files by looking for the following:

    • A resource named /META-INF/faces-config.xml in any of the JAR files in the web application’s /WEB-INF/lib/ directory and in parent class loaders. If a resource with this name exists, it is loaded as a configuration resource. This method is practical for a packaged library containing some components and renderers. In addition, any file with a name that ends in faces-config.xml is also considered a configuration resource and is loaded as such.

    • A context initialization parameter, javax.faces.application.CONFIG_FILES, in your web deployment descriptor file that specifies one or more (comma-delimited) paths to multiple configuration files for your web application. This method is most often used for enterprise-scale applications that delegate to separate groups the responsibility for maintaining the file for each portion of a big application.

    • A resource named faces-config.xml in the /WEB-INF/ directory of your application. Simple web applications make their configuration files available in this way.

    .. I could fix my problem.

    Step by step solution

    1. Create backing bean

      @FacesComponent(value = "elementBase")
      public class ElementBase extends UINamingContainer {
          ...
      }
      
    2. and a composite components with the following interface

      <composite:interface componentType="elementBase">
          ... some attributes, value holder, ..
      </composite:interface>
      
    3. provide a faces-config.xml within the deployed jar, to indicate that the jar contains annotated classes. The structure of the deployed jar should look like

      -- META-INF
          |-- resources
          |    |-- components
          |         |-- elementBase.xhtml
          |-- faces-config.xml
      -- com
          |-- example
          |    |-- ElementBase.class
      
    4. deploy the jar within the /WEB-INF/lib folder of the web application.

    Research/Related links and topics

    • JEE6> Packaging JSF facelets (xhtml) and ManagedBeans as JAR
    • Java EE6 Tutorial: Application Configuration Resource File
    • JSF facelets template packaging
    • How to create a modular JSF 2.0 application?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some difficulties in my project. I got the RGB values from a
I have some difficulties implementing the repository and service pattern in my RavenDB project.
I have some difficulties in converting a pseudocode into a MatLab algorithm. Specifically, there
I'm running into difficulties deploying a Rail app to Heroku. I'd really appreciate a
So I seem to have some difficulties with making my CodeFile reference into CodeBehind.
I have some difficulties with understanding BindingSource's behaviour. Let's look at following example: Creating
I have some difficulties for using Ruby block, passing in a method. As in
I'm have some difficulties here, I am unable to successfully call a method which
I am new to programing and I have some difficulties getting AlertDialog working. I
I'm having some difficulties with Ajax.BeginForm I have something like this in a view

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.