Question

I have a query form that I would like to submit as a GET request so the result page may be bookmarked and otherwise RESTful. It's your classical text field with a submit button. How do I induce Seam/JSF to use GET and include the query expression as a parameter rather than POST, the default?

Was it helpful?

Solution

All you need to do is enable the SeamFilter in web.xml. See Blog Example for an example RESTful application using Seam. The key is to use a Seam page parameter, defined in WEB-INF/pages.xml

OTHER TIPS

you can use a PhaseListener to convert POST requests to GET requests or just to interpret GET requests so that they can be bookmarkable.

This page should explain in more detail:

http://balusc.blogspot.com/2007/03/post-redirect-get-pattern.html

If you are using s:button or s:link, your form will be using GET method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top