Skip to main content

RESTful JSF?

5 replies [Last post]
miss_duke
Offline
Joined: 2007-08-25
Points: 0

Struts2 is having built-in support for REST and so Spring MVC.

Ruby on Rails on the other hand is having a strong built in support for REST.

But JSF 2.2 specification does not contain any such support, and it seems that this is not an agenda in future JSF specifications as well!.

Why JSF team is simply ignoring REST?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rogerkeays
Offline
Joined: 2005-06-15
Points: 0

Here is an article I just finished which might give you some help on how you can get JSF to behave with RESTful URLS:

http://www.ninthavenue.com.au/preserving-jsf-request-parameters-and-rest...

miss_duke
Offline
Joined: 2007-08-25
Points: 0
rogerk
Offline
Joined: 2004-05-06
Points: 0

One of the features added in JSF 2.0 specification and implementation was bookmarkable urls. Lots of blogs on this such as this one:

http://java.dzone.com/articles/bookmarkability-jsf-2

miss_duke
Offline
Joined: 2007-08-25
Points: 0

Bookmarkable URL is one of the most welcome feature, but it is not RESTful.

rogerk
Offline
Joined: 2004-05-06
Points: 0

Yes - you are correct - bookmarkable urls is not REST - it is a step in that direction. However, to really incorporate REST with JSF, you would probably need some sort of adapter that understands POST, GET, PUT, DELETE in a REST way. You probably would want direct access to the managed bean layer/EL..etc... You should also look at JSR 311.