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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:49:57+00:00 2026-06-03T13:49:57+00:00

I have an issue. It looks like PrettyFaces is overriding my webservlet url pattern.

  • 0

I have an issue. It looks like PrettyFaces is overriding my webservlet url pattern.

Part of my pretty-config.xml

<url-mapping id="searchClassifiedAdsBeanRewrite">
     <pattern value="/#{prefixDummy}/#{region:searchBean.region}/#{category:searchBean.category}" />
     <view-id value="/searchClassifiedAds.html" />
</url-mapping>

My servlet urlPattern follows

@WebServlet(urlPatterns = {"/images/*", "/images/temp/*"})

Now every time i have url that applies to my pretty faces definition my webservlet urlpattern is never invoked. Not the first one or the second url pattern.

If i dont have a pretty faces match then everything works.
(even if i change the #{prefixDummy} and hard code it will not work.

I’m using a file servlet (Actually its an example from BalusC) in order to display dynamic images!

Any help appreciated,
Thanks

  • 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-03T13:50:00+00:00Added an answer on June 3, 2026 at 1:50 pm

    The PrettyFaces support forum is probably the place where you want to start for this question: http://ocpsoft.org/support/forum/prettyfaces-users

    But since you asked here 🙂 basically what you are seeing is expected behavior. PrettyFaces will match ANY inbound Servlet request, forward, error, or include matching the given pattern. And if your image URL happens to match that pattern, then those will be matched by your Pretty URL mapping just like any other URL.

    You need to more closely restrict the pattern so that it does not conflict with your other URLs.

    This will be easier to address in PrettyFaces 4 when the Rewrite core framework (http://ocpsoft.org/rewrite/) is included. You will be able to match a URL while excluding URLs that are mapped by an existing Servlet.)

    This is already possible in rewrite:

    ConfigurationProvider.begin()
    .addRule(Join.path("/{prefixDummy}/{region}/{category}").to()
             .when(Not.any(ServletMapping.includes("/{prefixDummy}/{region}/{category}")))
             .where("region").bindsTo(PhaseBinding.to(El.parameter("searchBean.region")))
             .where("category").bindsTo(PhaseBinding.to(El.parameter("searchBean.category"))))
    

    Notice the negative constraint: ServletMapping.includes("/{prefixDummy}/{region}/{category}") which prevents the rule from matching when a Servlet in the container could otherwise handle the request.

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

Sidebar

Related Questions

I have an issue that looks like a race condition with a webview callback
i have a performance issue in my tableview my cellForRow looks like that: if
I am having the following issue : I have a table which looks like
HI all, I have and issue that looks like it's due to IE's box
I have an issue where if my json file looks like this { Numbers:
I have an nHibernate query issue that looks quite straight forward, but I can't
I have an issue where I must shred multiple xml datasets from multiple providers
Seems like everyone have issue accessing local machine or internet etc from emulator. All
I have an issue usign QTableWidgetItem. I normally use the QTableWidget like this this->setItem(i,
I have big issue with url-rewriting for IIS 7.0. I've written simple module for

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.