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
2
votes
1 answer

Prettyfaces/Primefaces Addressbar URL refresh

I am a beginner of Prettyfaces, so please forgive me if I missed something really basic. My url-mapping contains a EL-injected path parameter. The parameter value could be changed by user through selecting a drop down list item. My question is:…
2
votes
2 answers

Fileupload and PrettyFaces and JSF 2.2

I've tried the solution from: Primefaces FileUpload with PrettyFaces and JSF 2.2.3 But it doesn't work for a few files (tested under tomcat 7.0.50). One of the files…
Kian
  • 695
  • 2
  • 11
  • 23
2
votes
1 answer

JSF 2.2 file upload and Pretty Faces issue

I am using JSF 2.2 in a WildFly 8.0.0.Final with Pretty Faces 2.0.11.Final. When I turn pretty-faces on, the upload stops working. Here is the pretty faces config:
rvcoutinho
  • 326
  • 1
  • 10
2
votes
2 answers

File upload not working with PrimeFaces 4.0, PrettyFaces 3.3.3 and GlassFish 4

I tried to use p:fileUpload but fileUploadListener method wasn't called, nor any exception generated. Without PrettyFaces, file upload works fine. After some research, I found that Rewrite FAQ (http://ocpsoft.org/rewrite/docs/faq) answer for the…
Renato Herebia
  • 115
  • 1
  • 8
2
votes
1 answer

Rewriting URLs using pretty-config

I am facing problem with rewriting urls using pretty-config.xml and I want help. This is what I want. I want to render the URL as: http://www.example.com/{productId} and the page actual URL is: http://www.example.com/page/product.jsf In short, I…
SSC
  • 2,956
  • 3
  • 27
  • 43
2
votes
2 answers

Redirect with JSF and prettyFaces

I have a problem with redirecting with JSF and pretty faces. I am quite new to this stuff and need some help as I cannot get redirect to work, like I want it to. Basically I have this in my pretty config:
user2942523
  • 21
  • 1
  • 3
2
votes
1 answer

Can I replace pretty-config.xml configuration with annotations

I use the configuration file pretty-config.xml to rewrite urls:
user2354035
2
votes
2 answers

Prettyfaces, it's not been resolved?

I'm trying to build custom URL as prettyfaces tells that it do, but after setup it, it gives me this error: Referenced file contains errors (http://ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.3.xsd). For more information, right click on…
Valter Silva
  • 16,446
  • 52
  • 137
  • 218
2
votes
1 answer

error-page configuration in web.xml transforms the HTTP code returned in case of 404

I work on a JSF application powered by Tomcat 7.0.35. I would like to create a custom error page and have therefore played with the tag in the web.xml configuration file. 404
clark
  • 388
  • 3
  • 20
2
votes
2 answers

ocpsoft.org PrettyTime: Could not find any registered converter-class

I found this fairly incredible date conversion library for JSF called Pretty Time. I've included the maven coordinates into my pom.xml: org.ocpsoft.prettytime
Jonathan S. Fisher
  • 8,189
  • 6
  • 46
  • 84
2
votes
1 answer

generate outputLink action from data base

I have many menus of outputLink and I generated them from data base mysql like:
Mohsin AR
  • 2,998
  • 2
  • 24
  • 36
2
votes
2 answers

Using path parameters in with PrettyFaces

Many pages in a typical JSF applications are dynamic, meaning that there is a template view that would be used to render every object of a given type. For these pages PrettyFaces rewriting solution works great and effortless. An example is a web…
skuntsel
  • 11,624
  • 11
  • 44
  • 67
2
votes
1 answer

Different rules for the same view-id PrettyFaces

I have a jsf page which receive between 2 and 6 parameters, I would like to make this url look better, so I started to use pretty faces. When I create the rule for 2 parameters, everything works perfectly, but when I create the second rule, the…
Victor Bello
  • 493
  • 1
  • 8
  • 23
2
votes
1 answer

PrettyFaces error with required attribute

I'm developing a web application using JSF 2 and prettyfaces. I annotated one of my @ViewScoped beans with pretty annotations. That's what I have: @ManagedBean @ViewScoped @URLMapping(parentId = "app-list", id = "app-view", pattern =…
Aritz
  • 30,971
  • 16
  • 136
  • 217
2
votes
1 answer

How to map a long Liferay URL to a friendly URL with help of PrettyFaces?

I wanted to use the Liferay URL mapping, but currently there is a bug with JSF 2 and URL mapping, so it doesn't work (http://issues.liferay.com/browse/FACES-257). So I switched to PrettyFaces. My question is, how can you in PrettyFaces map a link…