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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:06:03+00:00 2026-06-07T15:06:03+00:00

I have created project using JF 2.0. When I run project, I can execute

  • 0

I have created project using JF 2.0.

When I run project, I can execute file xyz.xhtml by saying http://localhost:8080/myProject/faces/xyz.xhtml

However when I put the same in in folder xyz and try to execute as http://localhost:8080/myProject/faces/xyz/xyz.xhtml I get exception as java.io.FileNotFoundException.

First few lines of stacktrace are

java.io.FileNotFoundException
at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:403)
at com.sun.faces.facelets.impl.DefaultFaceletCache._getLastModified(DefaultFaceletCache.java:172)
at com.sun.faces.facelets.impl.DefaultFaceletCache.access$000(DefaultFaceletCache.java:62)
at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:82)
at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:78)
at com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

Can someone point at what I am doing wrong?

Update 1

File structure I have is

+ Web Content
  + WEB-INF
    - web.xml
    - faces-config.xml
  + xyz
    - xyz.xhtml
  - xyz.xhtml
  • 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-07T15:06:05+00:00Added an answer on June 7, 2026 at 3:06 pm

    Maybe you have a first folder structure like this

    + Web Content
      - xyz.xhtml
      + xyz
        - xyz.xhtml
    

    And your servlet mapping configuration for the Faces Servlet looks like this:

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    

    This means that the Faces Servlet (the servlet that send the request to the JSF framework) will apply for every page inside the ProjectName/faces/<whatever> (if and only if the pages are under a faces folder structure). If you want to apply the Faces Servlet for every html page in your site, change the configuration to this:

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>
    

    EDIT

    I’ve made a test based in your problem. It should work with no problems. Make sure the project have been built correctly and it has been correctly deployed, if you still have these problems try changing the servlet mapping configuration.

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

Sidebar

Related Questions

i have created a batch file and have added it to the project using
I have recently just created Java project using Eclipse that requires 2 JAR files
I have created SQL Server 2008 Database project using visual studio 2010. after build
I have created a maven project in eclipse using the maven2eclipse plugin. I then
I am using qt 4.5 I have created a project and I want to
I have created a MDI project with CView's using VS2008Pro. I want to have
I have recently created a web project in Java using eclipse. I have a
I have just created a new project in VS2010 using the Visual c# >
I'm using Visual Studio 2008 and have created a setup project for my application.
I have created a web application with a Silverlight project embedded in it, using

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.