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
23
votes
7 answers

Remove jsessionid from URL

I'm working on a project with the following technologies: Spring ShiroFilter PrettyFaces Tomcat server While I'm deploying it on tomcat server, I'm getting a "JSESSIONID 456jghd787aa" added at the end of the URL. I was trying to resolve this but…
Cijo
  • 345
  • 3
  • 5
  • 10
10
votes
3 answers

URL rewriting solution needed for JSF

Suppose the following application landscape: +-----------------+ | App server | +-----------------+ | | +-------+ | ear1 | | | | +-web1…
andbi
  • 4,426
  • 5
  • 45
  • 70
10
votes
1 answer

using pretty faces with web filters

Using Tomcat 7 --- Primefaces 3.4.1 --- javax faces 2.1.17 --- prettyfaces-jsf2 3.3.3 I configured pretty faces on my project correctly but my web filters are not working with new urls which are written by pretty faces. Here is an example…
oko
  • 1,295
  • 1
  • 14
  • 30
8
votes
2 answers

Getting the original request URI with PrettyFaces

I am using PrettyFaces in my JSF application. The site requires authentication to access some pages, so I'm using a listener (prerender view) that checks whether the user is logged in. So, if the user tries to access /foo (/foo.jsf before…
ustun
  • 6,941
  • 5
  • 44
  • 57
7
votes
3 answers

JSF and PrettyFaces - How to restrict direct xhtml requests

I'm new to JSF and PrettyFaces. So by now i found out that i can configure PrettyFaces to "forward" the request to the right .xhtml file. The problem is, that i (or a user, in case he knows my folder structure) also can request the file. This is my…
Alebon
  • 1,189
  • 2
  • 11
  • 24
7
votes
1 answer

Wrong redirect after logging in (Java EE w/ JSF)

Developing web application in Java EE with JSF. All pages are secured from viewing by authentication form with action 'j_security_check' and inputs 'j_username' and 'j_password'. After successful log in, however, I am redirected not to the page I…
redhead
  • 1,264
  • 1
  • 17
  • 32
6
votes
3 answers

Spring - Rewrite one URL to another

I have a Spring 2.5 application that contains a Flash banner. I don't have the source for the Flash component but it has links hardcoded to certain pages that end in .html I want to be able to redirect those .html pages to existing jsp pages. How…
George
  • 3,251
  • 7
  • 32
  • 39
6
votes
2 answers

JSF 2.2 h:inputFile not working with pretty faces

we're using a Glassfish 4.0 with JSF 2.2 (Mojarra 2.2.0) and PrettyFaces 2.0. When trying to upload a file using h:inputFile with the corresponding form enctype="multipart/form-data", the form action is only fired if the page is called directy, but…
bmurauer
  • 989
  • 8
  • 24
6
votes
3 answers

Primefaces FileUpload with PrettyFaces and JSF 2.2.3

I'm having some problems with PrettyFaces on the pages I use . When I disable the PrettyFaces filter on the page, everything works just fine. When I put it back, I can see the HTTP traffic on the webbrowser, but my fileupload handler…
Rodrigo
  • 385
  • 3
  • 12
5
votes
2 answers

PrettyFaces and h:link outcome tag don't redirect to a clean URL

My rewriting with PrettyFaces for an error page doesn't work for a h:link and I don't understand why. My link should redirect to login.xhtml and it should be /Login. What is happening, do I miss something? My rewrite rules navigation :…
ZheFrench
  • 1,164
  • 3
  • 22
  • 46
4
votes
2 answers

How to process prettyfaces 'query-param' in backing bean?

I have a list of users(dataTable with a link on userId that points to /user/view/{userId}). On clicking this userId link, the browser is redirected to the 'view' page as expected. I have a page that accepts the url pattern…
lofa in
  • 317
  • 1
  • 8
  • 26
4
votes
2 answers

Pretty Faces: Generic URL mapping

Using Pretty Faces 3, I have some mappings like these:
sinuhepop
  • 20,010
  • 17
  • 72
  • 107
4
votes
1 answer

remove application name from URL

my site uses JSF and the url appears to be, http://mysitename.com/wompower6/faces/home.xhtml I am using prettyfaces, so if I use the following in pretty-config.xml, i can change the name to http://mysitename.com/wompower6/home
user644745
  • 5,673
  • 9
  • 54
  • 80
4
votes
2 answers

documentation - is it a template?

I see that many sites are using the same template of documentation: PrettyFaces Hibernate and more. Is it a template that I can download somewhere? It's so clear!
Dejell
  • 13,947
  • 40
  • 146
  • 229
4
votes
1 answer

Spring Boot and PrettyFaces: PrettyFaces Not Loading

Summary: When I turn on my Spring Boot application. (Running on the embedded Tomcat 8 server) I never receive the: INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] RewriteFilter starting up... ... INFO [org.ocpsoft.rewrite.servlet.RewriteFilter]…
Seth Ellison
  • 143
  • 12
1
2 3
17 18