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

  • Home
  • SEARCH
  • 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

This is my current project structure: pom.xml /src /main /resources hibernate.cfg.xml /META-INF persistence.xml I
My Java project structure in Eclipse looks like this: myproject src/main/java com.mypackage.mysubpackage1 com.mypackage.mysubpackage2 com.mypackage.mysubpackage3
Project structure is: /foo pom.xml /foo-war pom.xml /foo-ear pom.xml This is my parent pom.xml
here is the structure of my project. proj ---src ----main ----java ----Main.java ----resources ----res.txt
I have a Java project which has this file structure (shown in Eclipse): ProjectName
I have up to 4 files based on this structure (note the prefixes are
I have this HTML structure and want to convert it to an accordion. <div
In reference to this question: Ideal ruby project structure I noticed that appname.rb is
If I have this project structure Foo.Data reference EntityFramework Foo.Business reference Foo.Data Foo.Web reference
Looking for suggestions on how to best track this project structure in some sort

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.