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
2 answers

prettyfaces processor life cycle

Im using pretty faces to rewrite my urls and Im using com.ocpsoft.pretty.faces.rewrite.Processor; I have notice that this filter its invoque several times while loading a URL, so as I access my DB to load some data this is extremely…
IturPablo
  • 1,572
  • 2
  • 22
  • 35
2
votes
2 answers

PrettyFaces, Filter, and url-pattern issue

I'm working on a Java EE (which I'm fairly new to) web application (JSF, JPA, EJB), and am in the process of incorporating PrettyFaces for human readable/bookmarkable URLs. I've been using a Filter for 2 reasons. to make sure a user is logged…
JasonI
  • 159
  • 1
  • 15
2
votes
1 answer

Navigation using Prettyfaces with dynamic id

I have a very simple page that simply prompts the user for a name and will then create a resource with that name. When the user hits the submit button, I would like to directly navigate him to the page for the just created entity. So my page looks…
Marcus Riemer
  • 7,244
  • 8
  • 51
  • 76
2
votes
1 answer

PrettyFaces and JSF ui:include causing action method to be called twice

I have an xhtml view being rendered via a prettyfaces request. I am running into a problem where the Action mapping from prettyfaces is being executed twice, but only when I have a ui:include tag. The example pretty config is like this: …
Eric
  • 1,953
  • 4
  • 24
  • 33
2
votes
1 answer

Ignore case in prettyfaces pattern

if you defined a url mapping as follows: @URLMapping(id = "myPage", pattern = "/myPage", viewId = "/faces/pages/myPage.xhtml") if you tried to enter the url as: http:localhost:8080/myPage this will work fine, but if you changed the case…
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
2
votes
1 answer

Should I use f:event or action element in PrettyFaces?

At the moment I am using the following code: public void init() { question = questionBean.findQuestion(questionParamId); } Which is invoked by this:
LuckyLuke
  • 47,771
  • 85
  • 270
  • 434
2
votes
1 answer

Gradle build profiles for i18n and PrettyFaces

Is it possible to define different profiles in gradle? I've written a WebApplication and i want to deploy it with the production settings. Furthermore my app is using PrettyFaces. Since i'm using different two languages i also want a language…
Alebon
  • 1,189
  • 2
  • 11
  • 24
2
votes
1 answer

Prettyfaces unable to find matching navigation case

I keep getting this error: Unable to find matching navigation case with from-view-id '/index.xhtml' for action '/faces/index.xhtml' with outcome 'finish_setup' The program works, redirecting my url to /Setup on form submission. However, this error…
user1011376
  • 211
  • 2
  • 5
  • 18
2
votes
1 answer

org.apache.catalina.core.StandardContext.filterStart Exception starting filter [OCPsoft Rewrite Filter]

I have successfully created a spring boot project which works fines however it fails when I try to deploy it to an external tomcat. Here is my pom XML and below is my application.properties…
Nemuga Dev
  • 334
  • 4
  • 10
2
votes
1 answer

Get beautified URL from HttpServletRequest

I am using the org.omnifaces.filter.HttpFilter to redirect visitors on login page when nobody is logged in. @Override public void doFilter(HttpServletRequest req, HttpServletResponse res, HttpSession session, FilterChain chain) throws…
robinvrd
  • 1,760
  • 12
  • 28
2
votes
2 answers

How to execute a method after loading the view in Pretty-Faces

I would like to execute a method once the link is being clicked and the new page is loaded. I have tried the tag as but this didn't help either :
ecdhe
  • 421
  • 4
  • 17
2
votes
1 answer

Multi-language url rewriting using Prettyfaces

I built my site to be Multi-language. I want the language code to be embedded in the address of page according to the locale. I have the following: http://localhost:8080/Wirote/index I want to have it as the…
R.Almoued
  • 219
  • 6
  • 16
2
votes
1 answer

Can the Flash data be persisted after redirection?

Using JSF 2.1.29 In list.xhtml
mehere
  • 1,487
  • 5
  • 28
  • 50
2
votes
1 answer

PrettyFaces 404 page without URL redirect

In our app with PrettyFaces 2.0.12.Final, we have our redirects set up in pretty-config.xml. We have a custom 404 page set up in our…
mheppler9d
  • 169
  • 2
  • 2
  • 9
2
votes
2 answers

Command button doesn't calls it's action method after including prettyfaces

I have embedded prettyfaces recently into my webapp and now I have really strange behavior. I have an update user form with a commandbutton: The commmandbutton look likes following. Neither command link nor command button invokes action method which…
1 2
3
17 18