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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:02:57+00:00 2026-05-26T21:02:57+00:00

I am working on a projec, the application is in j2ee and I have

  • 0

I am working on a projec, the application is in j2ee and I have used ehcache for web page caching but due to the entries of filter it gives me an error content encoding error i have added following filter and ehcache.xml can anyone say which entry causes it ?

web.xml filter entry

    <filter>
    <filter-name>SetCharacterEncodingFilter</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
        <param-name>encoding</param-name>
        <param-value>UTF-8</param-value>
    </init-param>
    <init-param>
        <param-name>forceEncoding</param-name>
        <param-value>true</param-value>
    </init-param>
</filter>
<filter-mapping>
    <filter-name>SetCharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
    <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>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>ERROR</dispatcher>
</filter-mapping>
<filter>
    <filter-name>extensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
        <description>Set the size limit for uploaded files.
                   Format: 10 - 10 bytes
                  10k - 10 KB
        </description>
        <param-name>uploadMaxFileSize</param-name>
        <param-value>100m</param-value>
    </init-param>
    <init-param>
        <description>Set the threshold size - files below this limit are stored
             in memory, files above this limit are stored on disk.
                     Format: 10 - 10 bytes
                     10k - 10 KB
        </description>
        <param-name>uploadThresholdSize</param-name>
        <param-value>100k</param-value>
    </init-param>
    <init-param>
        <param-name>uploadRepositoryPath</param-name>
        <param-value>/home</param-value>
    </init-param>
</filter>
<filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
</filter-mapping>
<filter>
    <filter-name>CachePage1CachingFilter</filter-name>
    <filter-class>net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter</filter-class>
    <init-param>
        <param-name>suppressStackTraces</param-name>
        <param-value>false</param-value>
    </init-param>
    <init-param>
        <param-name>cacheName</param-name>
        <param-value>CachePage1CachingFilter</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>CachePage1CachingFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>

ehcache.xml is as follow

 <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">

<diskStore path="java.io.tmpdir"/>
<defaultCache
    maxElementsInMemory="10"
    eternal="false"
    timeToIdleSeconds="5"
    timeToLiveSeconds="10"
    overflowToDisk="true"
/>
<!-- Page and Page Fragment Caches -->
<cache name="CachePage1CachingFilter"
    maxElementsInMemory="10"
    eternal="false"
    timeToIdleSeconds="10000"
    timeToLiveSeconds="10000"
    overflowToDisk="true">
</cache>

Edited:-

I tried and i got the problem is because of the url pattern in

   <filter-name>CachePage1CachingFilter</filter-name>
    <url-pattern>/*</url-pattern> 

in filter it goes continuously in filter the exception was reentrant exception if i am write following

    <filter-name>CachePage1CachingFilter</filter-name>
    <url-pattern>*.jsp</url-pattern>

it works fine but i want it to be worked for jsf and entry of jsf is done in preety config like follow

 <url-mapping id="ManageUsers">
    <pattern>/manageUsers</pattern>
    <view-id>/pages/master/manageUsers.jsf</view-id>
 </url-mapping>

what should i do to avoid this ?

  • 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-26T21:02:58+00:00Added an answer on May 26, 2026 at 9:02 pm

    With the servlet spec 2.5 (implemented by Tomcat 6) you can specify multiple url patterns:

    <filter-mapping>
        <filter-name>CachePage1CachingFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    

    For prior to 2.5, you’d be able to specify two mappings

    <filter-mapping>
        <filter-name>CachePage1CachingFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>CachePage1CachingFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have web application Project having RPC call. one RPC async is working fine.
I'm working on a little web-project-management-application. I have a few classes like Clients(), Services(),
I am working on project in JSF, using Tomcat 7. The application will have
I'm working on a project to convert an existing Java web application to use
I'm working on a project that requires a Web-based workflow application. We're now evaluating
I'm working on a project which will end up have a lot of application
I am working on a j2ee project, which is a public website. The application
I have a asp mvc 2 web application that with forms authentication. It is
I'm working on a web application project in Visual Studio 2005 and as of
I am working on a web application project where the DAL is generated using

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.