Questions tagged [prettyfaces]

PrettyFaces is the leading `/url/#{rewriting}` solution for Servlet, JSF, and Java EE

Pretty Faces

PrettyFaces is an OpenSource Filter-based Servlets extension with enhanced support for JavaServer Faces – JSF 1.1, 1.2 and 2.x – enabling creation of bookmark-able, pretty URLs.

PrettyFaces solves the “RESTful URL” problem elegantly, including features such as: page-load actions, seamless integration with faces navigation, dynamic view-id assignment, managed parameter parsing, and configuration-free compatibility with other web frameworks.


Features:

URL Rewriting — Replace ugly URLs: “/faces/page.jsf” with pretty, SEO-friendly, human URLs: “/optimized/page/”; The client browser never sees your original URLs, even in the source-HTML

Dynamic view IDs — Now with dynamic view ID mapping for URLs (through El method expressions,) you can show different views based on run-time conditions, effectively de-coupling the URL from the JSF view.

Page-load actions — Call one or more action-methods, at one or more phases, before rendering a view.

Managed parameter parsing — HTTP parameters parsed from URLs are stored in managed beans, simply get a reference to your parameter bean for easy access from other Java classes.

Navigation by ID — Define your page IDs in one place, reference them easily in action-methods and components, using standard JSF navigation techniques. Integrated validation — For URL and query-parameters, able to re-use existing JSF validator objects.

Integrated validation — For URL and query-parameters, able to re-use existing JSF validator objects.

Easy to configure — Requires absolutely minimal configuration; may be enabled using XML or annotations.


See Also

256 questions
4
votes
3 answers

how use primefaces and prettyfaces together?

Primefaces doesn't work when primefaces and pretty face use together. I add flowing jar: prettyfaces-jsf2-3.3.3.jar primefaces-4.0-20130605.174828-3.jar My web.xml code: Pretty Filter
Sms Kopex
  • 223
  • 2
  • 8
4
votes
2 answers

How to pass parameters to view-id in Pretty-Faces?

I want to pass some variable values to the view-id node in the pretty-config.xml configuration file. For sample: I want to do something like that:
andolffer.joseph
  • 613
  • 2
  • 10
  • 24
4
votes
2 answers

ViewScoped bean rebuilt when FileUploadListener called using PrettyFaces

I've inserted a component into my JSF 2.1.5 application. I'm using PrimeFaces 3.4.1. This component is backed by a @ViewScoped bean. I have my form in this way:
Aritz
  • 30,971
  • 16
  • 136
  • 217
4
votes
1 answer

JSF2 and PrettyFaces... how does one get the original URL or the query string?

PrettyFaces is a dead simple URL rewriting engine. All sorts of SEO is possible and it is really really easy. I have one small problem though :( Using pretty faces, I have this rewrite rule:
Jonathan S. Fisher
  • 8,189
  • 6
  • 46
  • 84
3
votes
1 answer

Get current page name with JSF/PrettyFaces

i am using PrettyFaces as url rewrite library as follows: @URLMappings(mappings = { @URLMapping(id = "page1", pattern = "/page1", viewId = "/faces/pages/page1.xhtml"), @URLMapping(id = "page2", pattern = "/page2", viewId =…
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
3
votes
1 answer

WARNING: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use

I am trying to create an application where I combine jsf2, prettyfaces, jpa and glassfish 3.1. I had some trouble gettings prettyfilter to load properly, which was fixed by following the tutorial here. However, after completing the steps I got a…
Runar Halse
  • 3,528
  • 10
  • 39
  • 59
3
votes
3 answers

Primefaces FileUpload is not working with PrettyFaces and Spring Boot

I am using Spring Boot 1.5.2.RELEASE with JSF 2.2.14 and Primefaces 6.1 and PrettyFaces 3.4.1.Final. My pom file is as follows:
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
3
votes
1 answer

CDI ViewScope & PrettyFaces: Multiple calls to @PostConstruct (JSF 2.2)

I'v already check similar questions which declare that JSF 2.1 had this bug, but I'm using JSF 2.2 Let's detail: My environment: CDI: 1.1 Dynamic Web Module: 3.0 Java: 1.7 JSF: 2.2 PrettyFaces: 2.0.12.Final My Bean: @Named(value =…
Manu Artero
  • 9,238
  • 6
  • 58
  • 73
3
votes
2 answers

URL rewriting with OcpSoft rewrite Join.path rule

I'm using Ocpsoft Rewrite, to perform URL rewriting in a JSF project. I have a redirect rule, which works fine: .addRule() .when(Direction.isInbound().and(Path.matches("/venue/{id}"))) …
user473453
  • 894
  • 2
  • 11
  • 23
3
votes
1 answer

Pretty URLs for JSF resources (CSS, JS, images) using PrettyFaces

I have a webapp running on Glassfish 3.1.2.2 which uses JSF 2.1 (Mojarra) and PrettyFaces 3.3.3 to facilitate the task of integrating "pretty" REST-style URLs with my application. However, looking at the generated html code I see rather "ugly" long…
RamboNo5
  • 2,050
  • 2
  • 17
  • 26
3
votes
1 answer

JSF PrettyFaces causing a Filter Chain-'break'

First, I will introduce you to my testcase before handling my question. There are a few components in my basic Maven Webapplication: page.xhtml: Used to generate my request/reply (to initiate filtering) Pretty Faces: Used to redefine URLs, based on…
Menno
  • 12,175
  • 14
  • 56
  • 88
3
votes
2 answers

Mobile site prefix and jsf 2

How can you implement the common mobile site patterns easily with jsf2? Can i achieve it with prettyfaces? Basically i want: m.mysite/index renders mobileIndex.xhtml mysite/index renders index.xhtml I want the "m." prefix specifically and I can't…
Karl Kildén
  • 2,415
  • 22
  • 34
3
votes
2 answers

Fix relative paths of script/css while rewriting URLs

I'm working with JSF2.1 and RichFaces 4.1 in JBoss AS 6.1.0.Final. Right now, I'm focused in rewriting the URLs. After trying different approaches I decided to stick to PrettyFaces since it's really intuitive to use (and got it working in a couple…
Fritz
  • 9,987
  • 4
  • 30
  • 49
3
votes
2 answers

How to redirect back to the same page using PrettyFaces?

I'd like to know how to redirect to the same page on action call. I have this commandButton: This is the action: @Named @RequestScoped public class SomeBean { public String edit() { …
VaclavDedik
  • 1,960
  • 4
  • 20
  • 27
3
votes
1 answer

Redirect with parameters in PrettyFaces

i have mapping like this: @URLMapping(id = "edituser", pattern = "/edituser/#{ id: userBean.userId}", viewId = "/faces/pages/users/editUser.xhtml") and i want to redirect to it from an action method, so i tried the following: return…
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
1
2
3
17 18