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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:16:11+00:00 2026-06-03T15:16:11+00:00

I am new at JSF, so do not assume that it is not some

  • 0

I am new at JSF, so do not assume that it is not some dumb mistake.

I am deploying my webapp, from Eclipse Indigo into JBoss 6.1. I can check that the webapp is deployed in the server because an static index.html file works ok (and changes in it are reflected via web browser).

I have a JSF2 Facelet in pages/NewRequest.jsf, which very little logic (in fact it is plain XHTML):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core">
<h:body>
Hola mundo again....
</h:body>
</html>

My web.xml is the following (I checked that the FaceServlet is configured)

<?xml version="1.0"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee web-app_3_0.xsd">
<display-name>GesMan</display-name>
<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>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>/faces/*</url-pattern>
 </servlet-mapping>
<welcome-file-list>
  <welcome-file>index.html</welcome-file>
  <welcome-file>NewRequest.jsf</welcome-file>
</welcome-file-list>
</web-app>

It all looks legit for me, but when I try to access the JSF I only get a 404 error page that tells me that a JSP with the same name that my JSP does not exist. No error is shown neither in the console nor in the server.log file

Could you tell me what I am doing wrong, or how can I get a more specific error information?

  • 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-03T15:16:13+00:00Added an answer on June 3, 2026 at 3:16 pm

    The file extension of the actual view file should represent the view technology used (e.g. .xhtml or .jsp), not the JSF mapping (e.g. .jsf). You should have a pages/NewRequest.xhtml, not a pages/NewRequest.jsf.

    Your other problem is that the welcome file can’t represent a mapped (virtual) filename, but must represent an actual filename. So you need NewRequest.xhtml there. But this in turn requires you that you map the FacesServlet on exactly that URL pattern.

    So, all with all, just simplify the web.xml as follows:

    <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>
    <welcome-file-list>
      <welcome-file>NewRequest.xhtml</welcome-file>
    </welcome-file-list>
    

    This way you can continue using .xhtml in URLs without fiddling with virtual URLs.

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

Sidebar

Related Questions

Im new into JSF 2.0. On the last version i understand that if i
I'm starting a new JSF (2) project. I realize that pure JSF has some
I'm quite new to using JSF and I'm not sure if that's the right
On our new platform we are utilizing JSF. Our WebTrends tags are not reflecting
I need to create a custom Component with JSF 2.0 (not composite component), that
i have a JSF/Seam Page and added a new not HTML Interface. I reused
I did some research on JSF view instances: new view, initial view, and postback
Is it possible with JSF to make ajax calls that will execute simultaneously (not
I'm new to Java-based web programming and am trying to learn JSF from the
I'm new in JSF and not sure about a few fundamental issues. I found

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.