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

Trouble integrating prettyfaces with jsf

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 Pretty…
hitesh israni
  • 1,742
  • 4
  • 25
  • 48
2
votes
1 answer

PrettyFaces navigation on selectOneMenu change

I have an application using PrettyFaces and PrimeFaces. One page is accessed using the URL pattern /#{ location : navigationBean.location }/#{ year : navigationBean.year }. On that page I have a p:selectOneMenu containing possible values for…
siebz0r
  • 18,867
  • 14
  • 64
  • 107
2
votes
1 answer

Primefaces fileUpload not work, FileUploadFilter call twice

I'm doing a Web application using Spring 3.1.0.RELEASE, JSF 2.x, JPA 2 with Hibernate Provider. The application run on Tomcat 6.35. I use PrettyFaces 3.3.2 for friendly URL and Spring security 3.1.0.RELEASE. I use Primefaces 3.1 and I try to use the…
La Chamelle
  • 2,927
  • 4
  • 36
  • 54
2
votes
2 answers

PrettyFaces: make all jsf pages "extension-less"

I would like to write inside that code (pretty-config.xml):
Fabio B.
  • 9,138
  • 25
  • 105
  • 177
1
vote
2 answers

JSF 2 + PrettyFaces -> IllegalStateException: PWC3990: getWriter() has already been called for this response

I have a Java EE App that has JSF2 + PrettyFaces + Facelets + EJB3 + EclipseLink. I'm continually running into an IllegalStateException as stated above, due to some inconsistencies in the JSF2 + Faceletes rendering model to work along with…
guilhebl
  • 8,330
  • 10
  • 47
  • 66
1
vote
1 answer

PrettyFaces redirect doesn't work with preRenderView event

i have a preRender view event in my bean, and i make some validation in it on the user, and when some condition occur, i redirect the user to login page using prettyFaces, but the redirection doesn't seem to work, i don't know why, here's the…
fresh_dev
  • 6,694
  • 23
  • 67
  • 95
1
vote
1 answer

How to use Prettyfaces with converter?

i'm using prettyfaces 3.3.2 and JSF 2.2.1. i want to convert pretty url string to entity object and use the object in the web page. pretty-config.xml:
Deniz
  • 364
  • 2
  • 7
  • 16
1
vote
1 answer

How does URL-rewriting work?

I have read many posts and blogs about rewriting and I know there is a difference between internal server rewriting and redirecting. I am interested in knowing how the internal rewriting works, and how this is done in Java. I am using PrettyFaces…
user626912
  • 2,546
  • 3
  • 24
  • 33
1
vote
1 answer

Do I need to make a custom regex pattern for this in PrettyFaces

Do I need to make a custom regex pattern to match URLs when I have the following mapping (example): /questions/approved/#{viewOption}/
LuckyLuke
  • 47,771
  • 85
  • 270
  • 434
1
vote
1 answer

Duplicated mapping id with PrettyFaces

i am using PrettyFaces 3.3.0 with Spring Security 3 i have two beans UserBean which is mapped to serve to pages (users,add) and LoginBean to serve the login page my mappings is as follows: 1-…
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
1
vote
1 answer

Using PrettyFaces 3.3.1-SNAPSHOT

i downloaded the 3.3.1-SNAPSHOT version to make generic url regarding this post: Pretty Faces: Generic URL mapping my configuration is as follows: my web.xml:
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
1
vote
0 answers

Pretty faces does not work in spring-boot

i have a problem with Pretty Faces... I'm trying mapping the urls in the file "pretty-config.xml" but the file doesn't read. When i try to access an url the console says that "No mapping for GET " error in console pretty-config.xml my browser I…
bordinhon
  • 11
  • 3
1
vote
1 answer

Can't get PrettyFaces running with Quarkus & Primefaces

I'm experimenting with Quarkus + Myfaces/Primefaces based on this repo https://github.com/apache/myfaces/tree/master/extensions/quarkus/showcase. Here I'm trying to include Prettyfaces to get nicer URLs. More specifically I'm trying to use OCPSOFT…
David Marko
  • 2,477
  • 3
  • 27
  • 58
1
vote
2 answers

javax.faces.application.ViewExpiredException: View could not be restored

i've created this webpage using jsf,prettyfaces and hibernate i looked around and most people says that this error is because of cache most of them found this error after login,logout and try to login back but i found this error when i log in,and…
tokwan
  • 11
  • 1
  • 2
1
vote
2 answers

How to reproduce specific Friendly URL?

we are trying to refactor an JSP/XSLT application to JSF. We use a CMS for content management. Technologies : JSF 2.0 using Mojarra, PrimeFaces 2.2.1 and Tomcat 6.29 The organisation of the data structure is the following: There are Sites. Sites…
La Chamelle
  • 2,927
  • 4
  • 36
  • 54