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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:08:56+00:00 2026-05-16T04:08:56+00:00

This is the structure of my project (exactly these five files): /p1 pom.xml /src

  • 0

This is the structure of my project (exactly these five files):

/p1
  pom.xml
  /src
    /main
      /java
      /webapp
        a.html
        b.xhtml
      /WEB-INF
        faces-config.xml
        web.xml

I’m deploying this WAR to GlassFish and I can successfully access this URL: http://localhost:8080/p1/a.html. When I’m trying to open http://localhost:8080/p1/b.xhtml I’m getting a message

The requested resource (/p1/b.xhtml) is not available.

What am I doing wrong?

ps. My dependencies from pom.xml:

...
<dependency>
  <groupId>com.sun.faces</groupId>
  <artifactId>jsf-api</artifactId>
  <version>${jsf.version}</version>
  <scope>provided</scope>
</dependency>
<dependency>
  <groupId>com.sun.faces</groupId>
  <artifactId>jsf-impl</artifactId>
  <version>${jsf.version}</version>
  <scope>provided</scope>
</dependency>
<dependency>
  <groupId>com.sun.facelets</groupId>
  <artifactId>jsf-facelets</artifactId>
  <version>${facelets.version}</version>
</dependency>
...

This is my web.xml (core part of it):

<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>*.xhtml</url-pattern>
</servlet-mapping>

My faces-config.xml:

<application>
  <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
  • 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-05-16T04:08:56+00:00Added an answer on May 16, 2026 at 4:08 am

    For the Maven side, things looks ok, except that facelets should also be provided. Actually, I use the following dependency:

    <!-- This dependency will bring in everything we need for JAVA EE6 -->
    <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-api</artifactId>
      <version>6.0</version>
      <scope>provided</scope>
    </dependency>
    

    For the JSF part, nothing in the server logs? Just in case, could you add the following to your web.xml to see if you get more useful output:

    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    

    As a side note, you don’t need your faces-config.xml as Facelets is the default view handler in JSF 2.0. But this shouldn’t be a problem.

    PS: Personally, I prefer to map the Faces Servlet on something like *.jsf (to clearly de-correlate any mapped url from the actual .xhtml facelet page that will be processed by the Faces Servlet).

    See also

    • JSF Facelets: Sometimes I see the URL is .jsf and sometimes .xhtml. Why?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python project with this directory structure and these files: /home/project_root |---__init__.py
Say I have this type of structure: Project/Code files : C:\myCode Git Repository :
I want to use this Structure in multiple .vb files within my project: Structure
Okay so, I have this project structure: package A.B class SuperClass (this class is
I have a project with a structure like this: project code art config Art
I have an Xcode project with a directory structure like this: MasterProjectDir/projectname.xcodeproj MasterProjectDir/ProjectSubDir/whatever.c MasterProjectDir/ProjectSubDir/etc.c
In an ASP.NET MVC3 project I have a structure like this: Core.csproj -> 3rdparty1.dll
When applying a multi-project Gradle structure to our project, my settings.gradle looks like this:
Is this possible in any way? My project folder structure looks like this: my_project:
Say i have this this structure. MyApp ├── main.py └── package ├── __init__.py ├──

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.