This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Invalid property in <set>

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added this line to change the response header in JSP .. I am getting error like this..





And this is the below jsp code where I added that line.



Any suggestions will be appreciated..
 
Marshal
Posts: 25818
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would imply that the "response" object had a method named "setAccess-Control-Allow-Origin()". Obviously this isn't a valid Java method name so it can't be the right thing to do.
 
Raihan Jamal
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Paul Clapham, so what should I do.. what will be the actual line instead of that.. I think m writing some property name wrong.. so that's why I am getting that error..
 
Paul Clapham
Marshal
Posts: 25818
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What should you do? I have no idea. Why don't you start by explaining what that code was supposed to do?
 
Raihan Jamal
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Paul Clapham, I am just trying to change the response header using JSP. As I am accessing URL on different domain and I am working locally.. as I have to get the response back from that server. So that's why I was trying to change the response header. Any idea how can I do this thing..
 
Paul Clapham
Marshal
Posts: 25818
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say you want to "change the response header" does that mean you want to set the value of a response header?

I also don't understand this:

As I am accessing URL on different domain and I am working locally.. as I have to get the response back from that server"

It sort of sounds like you expect to send a request to one server and find the response coming back from a different server, but even so you're using your JSP to send the response, so that doesn't seem to apply to anything here.
 
Raihan Jamal
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Paul Clapham, yes that's what I want to do..
 
Paul Clapham
Marshal
Posts: 25818
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I was editing my post when you replied. Basically the reason you gave for wanting to set the response header didn't make any sense to me.
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic