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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:39:51+00:00 2026-06-13T04:39:51+00:00

I need to integrate pretty faces with my jsf 2.0, primefaces application, but its

  • 0

I need to integrate pretty faces with my jsf 2.0, primefaces application, but its giving some troubles.

As mentioned in the getting started i placed following in my web.xml, added the required jar in the lib folder

<filter>
  <filter-name>Pretty Filter</filter-name>
  <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
  <async-supported>true</async-supported>
 </filter>

 <filter-mapping>
    <filter-name>Pretty Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
 </filter-mapping>

other items in my web.xml

  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <context-param>
        <param-name>com.sun.faces.expressionFactory</param-name>
        <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
  </context-param>
  <context-param>
        <param-name>org.primefaces.extensions.DELIVER_UNCOMPRESSED_RESOURCES</param-name>
        <param-value>false</param-value>
  </context-param>

But i am getting following Error:

Invalid content was found starting with element 'async-supported'. One of '{"http://java.sun.com/xml/ns/javaee":init-param}' is expected

If i remove <async-supported> from the project builds, project compiles but the mapping doesnt work.

pretty-config.xml is same as in the getting started.

Do i need to mention in my web.xml the name/path of the mapping file i.e pretty-config.xml?

EDIT:

I am using Glassfish server 3.

  • 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-13T04:39:54+00:00Added an answer on June 13, 2026 at 4:39 am

    It is very important to check the version attribute you are using in your web.xml. If you have version="2.5" set, you have to add this to your web.xml:

    <filter>
      <filter-name>Pretty Filter</filter-name>
      <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
    </filter>
    <filter-mapping> 
      <filter-name>Pretty Filter</filter-name> 
      <url-pattern>/*</url-pattern> 
      <dispatcher>FORWARD</dispatcher> 
      <dispatcher>REQUEST</dispatcher> 
      <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    

    Please not that <async-supported>true</async-supported> is NOT set here, because it is only supported in Servlet 3.0.

    If you have version="3.0" set in your web.xml, you don’t have to add anything to your web.xml. In this case PrettyFaces automatically registers the filter using the web-fragment.xml that is included in prettyfaces-jsf2.jar.

    You don’t have to specify the location of pretty-config.xml anywhere. Just place it in your WEB-INF folder and PrettyFaces will find it.

    You should also add one mapping to your pretty-config.xml, so you can check if everything works correctly. If you have for example a page that you typically access using an URL like:

    http://localhost:8080/myapp/faces/login.xhtml
    

    Then you can add this mapping:

    <url-mapping id="login">
      <pattern value="/login" />
      <view-id value="/faces/login.xhtml" />
    </url-mapping>
    

    Now you should be able to access the page using this link:

    http://localhost:8080/myapp/login
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to integrate mail service in my application. My application should send the
I need to integrate some legacy 32-bit code - for which I don't have
In my asp.net application i need to integrate a jquery content slider with next,
I am working on an application where I need to integrate the social functionality
I am working on an application where I need to integrate the social functionality
I am working on an application where I need to integrate the search engine.
How can I integrate a Scrollwheel into my application? I'm currently using Sliders but
I need to integrate Foursquare to my iPhone app. I need to do the
I need to integrate the functionality of creating dynamic pages (like google sites) to
I have recently taken on a project in which I need to integrate with

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.