Hello,
I'm creating a web application with Seam that, in addition to serving web pages, will
also provide JSON objects for some Ajax calls.
My first thought was to simply let an xhtml page return JSON, as follows:
| <html ...><head></head><body>
|
| <ui:composition>
| { "someKey": "someValue",
| "someOtherKey": "#{someBean.someValue}" }
| </ui:composition>
|
| </body></html>
|
This became cumbersome for a number of reasons, and I pressume this is not the most
elegant way to do it.
My second thought was to create an old fashioned servlet to return the JSON data. I am,
however, having some problems accessing Seam features, EntityManager etc in the servlet.
So, I am wondering, what is the best practice for doing this in a Seam web application?
All suggestions are welcome.
~Frode
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157741#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...