tags:

views:

10

answers:

1

i want to return a json object from doview method of a basic portlet to dojo.rawXhrPost (handle as:xml) method of javascript how to do that?

A: 

I am going to guess that you are working with Java portlets. There may be other solutions specific to your container, but you don't say what that is.

The correct way to serve a resource from a portlet context is via the serveResource method by using a resource URL. If you're still using JSR 168 portlets, you'll have to resort to using a servlet.

Any AJAX calls to a render URL to invoke doView are likely to re-render all your page's portlets and the surrounding theme. You'll have to deal with a load of junk data in your JavaScript and there may be unintended side-effects.

McDowell