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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:01:37+00:00 2026-06-01T07:01:37+00:00

Summary When I try to run a JSF 2.0 application from within Eclipse (on

  • 0

Summary

When I try to run a JSF 2.0 application from within Eclipse (on Tomcat 7.0) I get the following exception:

Problem: SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener

Details

I’m learning to develop JSF applications, using Eclipse.
I started with a preconfigured Eclipse project: File->New->Dynamic Web Project->JavaServer Face v2.0 Project.
Using this method Eclipse provides all dependencies. But I want to really learn how everything works. I want to remove the “magic”, so I converted my project to a Maven project: Configure->Convert to Maven project.

I then created my pom.xml (based on http://myfaces.apache.org/build-tools/archetypes/myfaces-archetype-helloworld20/index.html), it contains the following:

<build>
    <finalName>jsf-facelets-tutorial</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <webXml>WebContent/WEB-INF/web.xml</webXml>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>
<dependencies>
    <dependency>
        <groupId>javax.el</groupId>
        <artifactId>el-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.0</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.myfaces.core</groupId>
        <artifactId>myfaces-api</artifactId>
        <version>2.0.5</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.myfaces.core</groupId>
        <artifactId>myfaces-impl</artifactId>
        <version>2.0.5</version>
        <scope>runtime</scope>
    </dependency>
</dependencies>

But because I’m unfamiliar with JSF, and because this is an Eclipse “Dynamic Web Project”, the project structure is new to me and I’m having trouble understanding which dependencies are coming from Maven and which are provided by the Eclipse “magic”.

In Eclipse, my project structure is as follows:

ProjectName
  JAX-WS Web Services <-- CAN I REMOVE THIS???
  Deployment Descriptor
  Java Resources
    src/main
    Libraries
      Apache Tomcat v7.0
        el-api.jar
        jsp-api.jar
        [more...]
      JSF 2.0 (Apache MyFaces JSF Core-2.0 API 2.0.2) <-- I REMOVED THIS!!!
      EAR Libraries
      JRE System Library
      Maven Dependencies
        el-api-1.0.jar
        myfaces-api-2.0.5.jar
        myfaces-impl-2.0.5.jar
        [more...]
      Web App Libraries

Problem
My (very basic) application (login page & welcome page) no longer runs.
When I do the following:

(1) Right click on WebContent/login.xhtml
(2) Run as -> Run on Server
(3) Apache Tomcat v7.0 - JDK6 at localhost

I get the exception:

Problem: SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener

I have the feeling that this is very easy to fix, but I’m too unfamiliar with these frameworks to work it out.

If there are any additional details I should provide (web.xml, faces-config-xml, login.xhtml), let me know and I’ll add them.

Thanks!

EDIT

WEB-INF/lib is always empty. From my understanding, it’s necessary to copy all dependencies into this folder, that will be required at runtime, and that are not provided by the Web Container. The reasons mine is empty are: (1) I don’t know what I need in there (2) I don’t know how to automate the process of putting .jar files in there

  • 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-01T07:01:39+00:00Added an answer on June 1, 2026 at 7:01 am

    Under your eclipse Project Properties, select Deployment Assembly from the navigation menu which defines “packaging structure for this Java EE Web Application project.” Make sure you have all the project dependencies added here..

    Or look into web server directory under workspace/.metadata/.plugins/org.eclipse.wst.server.core\tmp0 to check if the jars have been copied to catalina base.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get the error below when I try to run the application I am
I try to build a product with Tycho 0.13.0, but I get a following
Summary: I've run into an interesting problem, and I'm not quite sure how to
when my event fires the following code get's run: WebBrowser browser = new WebBrowser();
when i try to run an web application in visual studio 2008.. i got
Summary: I'm developing a persistent Java web application, and I need to make sure
I have the following problem in wpf: I have defined a user control (in
Summary: I want to be able to run a query against an external database
In the following method, the first catch block is never run, even when an
Summary Let's say I have two C# 4.0 classes, one inheriting from the other:

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.