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: one mapping configuration for multi .xhtml page

I have one question. How could pretty faces do this: Well, I wonder if pretty faces could hide paths of all .xhtml in folder…
Thien Dinh
  • 373
  • 1
  • 6
  • 15
0
votes
1 answer

Navigation using path parameter on Pretty Faces 2.0.8.Final

Consider the configuration below: @URLMapping(id = "programaManter", parentId = "homeTreinamento", pattern = "/programa/#{id : programaManter.id}", viewId = "/pages/treinamento/ProgramaManter.xhtml") Lets say that I need to navigate to /programa/1.…
0
votes
1 answer

Manipulate postback url request parameters

Form data is always posted back to the underlying page URL (to save the view state). Is there any way (filter?) we could append request params to the response url, without any redirect ? For example, I have a page1.xhtml with form data. After…
0
votes
1 answer

Keep prettyfaces extensionless URLs as “to-view-Id” within faces-config.xml

How do I keep Prettyfaces created extensionless URLs in the to-view-id(s) within faces-config.xml so that it doesn't append .xhtml to the end of it ? For e.g. while defining a navigation case, I define a to-view-id as /topics/54233 but faces-config…
Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
0
votes
1 answer

URL rewrite for JSF

I'm using JSF, Jboss. I used urlrewrite filter and i don't know why: when i type localhost:8080/myweb/user/myname will be forwarded to localhost:8080/myweb/user.xhtml?u=myname. it makes me don't like urlrewritefilter. After that, i try using…
Lost Heaven 0809
  • 396
  • 2
  • 7
  • 23
0
votes
1 answer

JSF 2 : How to make browser back button not to used cache pages and make a kind of refresh/redirection?

I use JSF 2.2 & prettyfaces. I want to prevent security problems linked to browser backward functionality. To resume the navigation link between my pages in my application : I have a login page done with Spring Security which redirects after…
ZheFrench
  • 1,164
  • 3
  • 22
  • 46
0
votes
0 answers

In JSF2, could we keep flash parameter more than one redirection on a view?

I'm using Mojara 2.2 ,Tomcat 7 and Pretty Faces 3. I'have a page (called Student) who receives one param from the flash scope. Then when I refresh the page or execute an h:commandButton adding some stuff in my database, the flash param disappears. I…
ZheFrench
  • 1,164
  • 3
  • 22
  • 46
0
votes
1 answer

How to fix Faces Servlet (javax.faces.webapp.FacesServlet) not found in web context - cannot configure PrettyFaces DynaView?

I currently added the prettyfaces-jsf2-3.3.3.jar to my netbeans project. I also added the pretty-config.xml in the WEB-INF folder with the following test rewrite rule:
Briefkasten
  • 1,964
  • 2
  • 25
  • 53
0
votes
0 answers

how to get mapping id dynamically from data base

i am developing an application in which i have put menus which are rendered from mysql database i have inserted menus names and mappingIds into db table. now i am getting problem how do i rendered list (list of menus) into xhtml(jsf html tags)…
Mohsin AR
  • 2,998
  • 2
  • 24
  • 36
0
votes
2 answers

JSF 2 : How to refresh value into the backing bean from a SelectOneMenu?

I use Pretty Faces and JSF 2. I have a selectOneMenu to choose a value. I want then to pass the selected value to a second form with a command button to pass then to an another page. I don't want to see the parameter in the URL. I don't want the…
ZheFrench
  • 1,164
  • 3
  • 22
  • 46
0
votes
0 answers

With a specific URL pattern set bean property to a specific constant value

With Prettyfaces in my JSF 2.1 application, I want like to add a rule that whenever a particular URL pattern is seen, then set a specific constant value to bean property. For e.g. when there is a pattern like ../products/electronics then it should…
Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
0
votes
1 answer

Prettyfaces programmatic configuration

Questions Is there any way to configure pretty-faces programmatically, without using the pretty-config.xml file? If pretty-config.xml must be used then; is there any way to override/augment its UrlMapppings programmatically? Problem Context: In my…
thorondor
  • 133
  • 1
  • 4
0
votes
0 answers

JSF 2.2 + PrimeFaces 3.5 + PrettyFaces-Jsf 3.3.3

I'm trying to use PrettyFaces in my web app because SEO it's not friendly with it! I configured PrettyFaces without problems and it works fine! But.....I can see a strange "url behavior". This is my pretty-config:
vale_dev
  • 3
  • 2
0
votes
2 answers

Can not generate p:datatable in h:panelgrid values on ajax p:commandbutton update

I am developing a project in JSF2.1 ,prettyfaces, hibernate 4 , primefaces I am getting a problem here… I ve one p:commandbutton which calls ajax request where condition checks that, financial year is opened or not
Mohsin AR
  • 2,998
  • 2
  • 24
  • 36
0
votes
1 answer

Passing query string with PrettyFaces

I'm working with JSF2 and PrettyFaces for creating a 'SEO-friendly URLs'. Now I'm facing a problem when I want to pass parameters after the PrettyFaces is creating a new url those parameters will been delete and i want to avoid that. I will…
choop
  • 921
  • 2
  • 9
  • 28