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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:33:52+00:00 2026-06-10T13:33:52+00:00

I´m a JSF-Beginner and try to build a small JSF2 webapplication with Spring and

  • 0

I´m a JSF-Beginner and try to build a small JSF2 webapplication with Spring and Hibernate. My Server of Choice is the JBOSS 7.1 AS.

I´ve encountered an odd Error while trying to map a servlet with a Prefix URL-Pattern. This is the part of the web.xml that declares the Servlet:

<servlet>
    <servlet-name>FacesServlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>/webapplication/*</url-pattern>
</servlet-mapping>

If I now direct my Browser to “localhost:8080/myapp/webapplication/index.xhtml” I get a Mojarra/Facelets generated Error: “/index.xhtml Not Found in ExternalContext as a Resource”.
If I instead configure the URL-Pattern to “*.xhtml” everything is working fine.

I have simply no idea why the Prefix-Pattern isn´t working :/

Greetings

  • 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-10T13:33:54+00:00Added an answer on June 10, 2026 at 1:33 pm

    I found the solution :D!

    When using a prefix-pattern I thought i had to place my xhtml-files in a folder of that name.
    For example I used the pattern “/webapplication/*” so I created a folder “webapplication” and placed my webfiles in there. Now, when directing my Browser to
    “{host}/myapp/webapplication/index.xhtml” I expected the Server to search the files in “{root}/webapplication/index.xhtml”. Instead, the Servlet resolved the URL as
    “{host}/myapp/index.xhtml”. Because the file isn´t placed there, I get a FileNotFound-Error.

    I also learned not to give my resource-folders the same name as my url-patterns.

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

Sidebar

Related Questions

JBoss JSF page cache doesn't always seem to be updated when I change my
We have a JSF 1.2 application with RichFaces 3.3.3 on JBoss 5.1. When we
I'm a beginner in JSF and I´m having the following problem: I have a
I'm the beginner with JSF. As I know, to start working with JSF I
Im trying JSF framework. Im a beginner. So i start with a easy tutorial
In JSF you can display validation error's using <h:messages /> . But what I
The jsf page below produces the error as follows. Does that mean that the
Using jsf 1.2, hibernate, richfaces 3.3.0GA and facelets. I have this code in my
JSF 1.2-1.2_07-b03-FCS JSTL 1_1-mr2 (special build) Java 1.6.0_22-b04 Eclipse 3.6.0 (Helios) Tomcat 6.0.28 (needs
my JSF web app is giving randomly error: zip file closed when accessing files

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.