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

Pretty Faces EL Injection does not work

I am building an online application in JSF 2 with Primefaces and Spring. I want to use Pretty Faces to make our search urls bookmarkable. Here is my pretty-config.xml:
xgb84j
  • 519
  • 2
  • 8
  • 19
0
votes
1 answer

URL redirection JSF

I have my my app url: 127.0.0.1:8080/reader/read.xhtml The read.xhtml is populated thorough database and has got various links which are hard coded in database. (read.xhtml is actually retrieved as String from DB.) for e.g. there are…
0
votes
1 answer

@URLAction is not called

I have a problem hitting to load method when the page loads/refreshes, page loads correctly from xhtml file, but load method is never get called. Any ideas? @ManagedBean @ViewScoped @URLMapping(id = "deactivate", pattern = "/deactivateaccount",…
Spring
  • 11,333
  • 29
  • 116
  • 185
0
votes
2 answers

Logout using session.invalidate(), does not forward to login page thereafter

I have a logout link which looks like:
And the corresponding logout method: public String logOut()throws Exception{ …
Ravi Kavaiya
  • 829
  • 6
  • 16
0
votes
1 answer

Cannot create a session after the response has been committed - PrettyFaces MultiPageMessagesSupport on Glassfish4

I have a Java EE app where I use JSF2 + PrettyFaces + EBJ3 + Glassfish I just recently updated to Glassfish4 which is the default Server implementation for Java EE 7 and I started getting issues with PrettyFaces. I have configured on my…
guilhebl
  • 8,330
  • 10
  • 47
  • 66
0
votes
1 answer

can we have same pattern in mapping-url with ¨Prettyfaces?

i used prettyfaces in my project and its working well but when i tryed to use similar pattern for two url-mapping it always keep the first in mind and neglagte the second url-mapping that have the same pattern. i want to ask you if there is a way to…
marouanoviche
  • 253
  • 4
  • 11
  • 28
0
votes
1 answer

How to configure url mapping to get all* url request to one jsf page in PrettyFaces / Rewrite

Can I configure PrettyFaces / Rewrite for mapping all incoming URL request to one page? Then how I can get full URL path after domain name from PrettyFaces / Rewrite? Maybe have some annotation or some like this {URLPATH}? Looks like this, but…
452
  • 396
  • 4
  • 9
  • 24
0
votes
1 answer

Prettyfaces and the container based security

I have problem using the container-based security with prettyfaces. As far as I disable prettyfaces (remove its existence in pom.xml), the container-based security is working fine and pages are secured well. However, with using prettyfaces, the…
Matej Briškár
  • 599
  • 4
  • 17
0
votes
1 answer

Prettyfaces weird behaviour when path contains two levels

I am getting a very weird behavior from Prettyfaces 3.3.3 with JSF 2.1.7. In fact, when I make this mapping: Everything…
Laabidi Raissi
  • 3,263
  • 1
  • 22
  • 28
0
votes
2 answers

Authentication(Spring Security) object is null when URL is not mapped by PrettyFaces

I'm using JSF(Primefaces), Spring, Spring Security, MyBatis and PrettyFaces in my application. I've a URL not mapped by PrettyFaces. This url redirect to XHTML page. XHTML page is mapped with Spring Security and is associated a role of my…
Cesar Miguel
  • 661
  • 1
  • 13
  • 38
0
votes
1 answer

prettyfaces and jsf: getting null values in action class using filter

hello i am using prettyfaces jsf2.0 i ve created a filter which is checking every request whether user is logged in or not @WebFilter(urlPatterns= {"*.xhtml"} , dispatcherTypes = {DispatcherType.REQUEST}) public class Authentication implements…
Mohsin AR
  • 2,998
  • 2
  • 24
  • 36
0
votes
1 answer

p ajax listener using pretty faces

I have a 2 combo boxes 1.company & 2.city, when I select any company from company's combo box, it will change city combo box on ajax my Question is that should I use OR
Mohsin AR
  • 2,998
  • 2
  • 24
  • 36
0
votes
1 answer

@URLMappings annotation, the action will be used for each of the mappings

hello I have two URL mappings in java class one is calling on hyperlink and other is on button on hyperlink I call @URLAction(mappingId="abc") //method.. private String hello(){ return null; } on button I…
Mohsin AR
  • 2,998
  • 2
  • 24
  • 36
0
votes
1 answer

can not generate selectonemenu items in primefaces

hello i am new here in stackoverflow i am using primefaces 3.5 my question is that, is it necessary to set selectonemenu items(Map of java util) in static block or constructor.. like: slider.xhtml
Mohsin AR
  • 2,998
  • 2
  • 24
  • 36
0
votes
2 answers

Redirect CSS URL to one without www subdomain

I would like to know if there is a way to remove www (or add) when happens a request. Here's my problem: I'm inserting CSS this way: "//domain.com.br/resources/cssname.css" if I access a page http, everything works perfectly, but when I access a…
Victor Bello
  • 493
  • 1
  • 8
  • 23