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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:01:42+00:00 2026-06-17T06:01:42+00:00

I have a JSF webapp which is exhibiting the following behaviour: http://localhost/myapp/ returns the

  • 0

I have a JSF webapp which is exhibiting the following behaviour:
http://localhost/myapp/ returns the raw contents of index.xhtml
http://localhost/myapp/web/ returns a blank page
http://localhost/myapp/web/index.xhtml returns the error /index.xhtml Not Found in ExternalContext as a Resource

The directory structure of the webapp is shown below:

enter image description here

The web.xml file looks as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
          http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
      <display-name>myapp</display-name>
       <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
      </context-param>
       <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>/web/*</url-pattern>
      </servlet-mapping>

      <session-config>
        <session-timeout>30</session-timeout>
      </session-config>

    <!--   <welcome-file-list>
        <welcome-file>index.xhtml</welcome-file>
      </welcome-file-list>
     -->  
    </web-app>

I have a breakpoint in the first line of the method javax.faces.webapp.FacesServlet.service

public void service(ServletRequest req,
                    ServletResponse resp)
    throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    HttpServletResponse response = (HttpServletResponse) resp;

    requestStart(request.getRequestURI()); // V3 Probe hook

This breakpoint is never hit. Is anyone able to shed some light on what may be wrong here or some pointers on where I can start my investigations.

  • 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-17T06:01:43+00:00Added an answer on June 17, 2026 at 6:01 am

    JSF will trim off own URL pattern from the request URL before finding the resource. You need to put /index.xhtml file exactly there where JSF expects it as per the error message: in /index.xhtml. So, outside the /web folder. Note that you can just keep using /web in request URL.

    An alternative is to just map the FacesServlet on *.xhtml. This way you don’t need to worry about virtual URLs.

    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 JSF project and I already have an index.xhtml page which is
i have a jsf page which displays an image from an url http://ichart.finance.yahoo.com/z?s=^NSEI&t=1d&q=l&l=on&z=l&p=s&a=v&p=s i
I have the following 3 simple pages in a JSF app. index.html start.html confirmSuccess.thml
We have deployed our webapp, which was developed with JSF, Spring and Hibernate on
I have several jsf pages. I need to add dynamic breadcrumbs to the header.xhtml.
I have a small web application developed using Icefaces 1.8.2 and jsf 1.1 which
I have a JSF webapp with some standard JSF pages and backing beans. I
I have a more complex webapp in JSF2 (+EJB3.1 +JPA2 on glassfish 3.1), which
When you use JSF, you'll have the controller servlet javax.faces.webapp.FacesServlet that will be mapped
I got this error when I tried to access my development site via http://localhost/home/index.html

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.