"Access-Control-Allow-Origin" when you include the Javascript file in the Portlet

I'm having this problem

I have a few lines in my JSP to load JQuery portlets /Search/ folder

< c:set var = "req" value = "${pageContext.request}" / > "

"{< c:set var = 'baseURL' value="${req.scheme}://${req.serverName}:${req.serverPort}${req.contextPath} "/ >

"< script type =" text/javascript"src="${baseURL}/Search/jquery-1.10.2.min.js "> var baseURL =" ${baseURL} "; < /script >

However, I get the following error

  1. OPTIONS http://fswcs-21:8889 /WorkflowPortlets/Search/jquery-1.10.2.min.js 200 (OK) core - 11.1.1.7.0 - 3009.js:25
  2. XMLHttpRequest cannot load http://fswcs-21:8889/WorkflowPortlets/Search/jquery-1.10.2.min.js. No "Access-Control-Allow-Origin" header is present on the requested resource. So, the original 'http://fswcs-21:8888' is not allowed access.

Is there a way to fix this? I tried the setting:

  • response.addHeader ("Access-Control-Allow-Origin", "*"); in the JSP
  • and response.addProperty ("Access-Control-Allow-Origin", "*"); in the doDispatch() method.


Solved this problem by the following

Tags: Fusion Middleware

Similar Questions

Maybe you are looking for

  • Storage issue.

    How can I move all of my assets to the iCloud to free up space on my iPhone 6?

  • to bookmark all open tabs?

    Is it possible to bookmark all tabs open at the same time and save it in a folder that I have chosen?

  • I went from windows Vista to Windows 7 and know its showing is not real help!

    Hello I have a Hp Pavilion with Windows VistaHome Premium desktop computer and it crashed a few months ago. I tried to do a system restore and the power lost during the process of... My father had to reformat hard drive five times and then installed

  • Family Safety site do not authenticate... cannot open a session.

    For the last two weeks, I was unable to connect to fss.live.com.  She seems to be an authentication failure or error field.  I can make and connect to, live.com, but not fss.live.com.  It doesn't matter what PC I use (in my network or another network

  • AAA &amp; RADIUS

    In a laboratory, when I set the following there is no recording of the show in the switch using telnet/ssh: AAA new-model Group AAA authentication login default RADIUS RADIUS group AAA authorization exec default authenticated if start-stop radius gro