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

that's your default temp folder

once you pick a directory to open or save to, that will be the new default, with a list of running directories down the left

Glen Conway

Dear Puzzled,

If you want the File -> Open dialog's Location drop-down list to default to a specific directory, just add this to your sqldeveloper installation's sqldeveloper.conf file:

AddVMOption -Djava.io.tmpdir=<desired_directory>

Not sure if other features use java.io.tmpdir, so there may be unexpected side-effects.

EdStevens

thatJeffSmith-Oracle wrote:

that's your default temp folder

once you pick a directory to open or save to, that will be the new default, with a list of running directories down the left

Nope.  It still defaults to the temp dirctory, forcing me to navigate to where the scripts are saved.

EdStevens

Nope.  It still defaults to the temp dirctory, forcing me to navigate to where the scripts are saved.  And yes, I did restart SQL Dev after modifying the conf file.

I have now backed out the change.

Answer

19.1 on a mac

SQL Worksheet

Open .. navigates to a random folder, opens file.

Hits open dialog again.

I'm starting at same random folder from just previous go.

Are you not seeing the same, or perhaps you're doing something differently?

The default place to look for scripts has no connection to where SQLDev looks to open or save files to.

Marked as Answer by EdStevens · Sep 27 2020
EdStevens

Ah, that works - within a SQL Dev session.  I was expecting persistence, such that the next time I open SQL Dev, then 'file > open' would default back to my chosen location.  I do see that it saved the location as a 'recent' in the list on the left, and that will suffice.  Thanks for the help.

Glen Conway

Glad to see you are satisfied with the default behavior that @"thatJeffSmith-Oracle" described.  As for overriding java.io.tmpdir, it definitely works for me if I have an open worksheet.

With no worksheet open then, yes, the Open dialog's Location selector defaults to something even worse than AppData\Local\Temp.

Cheers

1 - 7
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,306 views