Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Weblogic Portal - Disc API bug in response content type

689262Feb 25 2010
Hi

While using WLP Disc APIs in the portal for AJAX calls, the response content type returned by the weblogic portal server is:
text/x-netuix-json-comment-filtered; charset=ISO-8859-1
This is not getting changed to 'application/json' inspite of setting this as the content type for a JSF JSP.
Probably, looks like a bug.

We have a JSF portlet in which we need to make an AJAX call.
Please refer to the weblogic whitepaper for the AJAX examples (weblogic-portal-jsf-whitepaper.pdf).
The example works fine in the dev/build environment. When the portal server is accepting calls through Sun One webserver,
the logs from the webserver show the response content type from the portal server as "text/x-netuix-json-comment-filtered; charset=ISO-8859-1"

- I tried changing the content type to "application/json" in the JSF JSP (as per the example from the pdf file). Still the content type does not change.
- The response from the portal server is suffixed with "\n\r\t". Because of the trailing space/carriage return chars in the portal server response, the sun one webserver is unable to parse (or) eliminate the "\r\n\d" chars to the browser. When the browser receives a response (with the trailing chars), the module.js (weblogic wrapper API for DISC calls) fails.
- The module.js tries to check whether the response from portal server ends with "**/" but unfortunately, the weblogic protal server returns
"/** %json response%**/\n\r\d"

I found a workaround to this issue by having a filter for the JSF JSP which sets the content type as "application/json" and does a flush() before it makes a call to the JSF JSP which responsds to an ajax call. This works as the content type is set and flushed first so any attempt by the portal server to set as "text/x-netuix-json-comment-filtered" does not get reflected in the http response.

Any support/fix from oracle regarding this will be helpful as most of the webserver integration with the portal server happens during the middle of the project build and might lead to a technical risk.

Server details: WLPS 10.3, Sun One 7.0

Thanks

Ananth Krishnan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2010
Added on Feb 25 2010
0 comments
1,307 views