• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

response.setContentType()

 
Aggarwal Arpit
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having a String str


I am writing to response and fetching in Ajax call


Now the question is, I am getting String but some extra string is appending to it like


to responseObject, don't know why, even i removed
context.getResponse().setContentType("text/html;charset=UTF-8");

Please help me to solve this issue.

Thanks In Advance!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It has nothing at all to do with the content type. Somehow, that text is getting inserted by your code into the response buffer. Inspect your code to see why.
 
Aggarwal Arpit
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Bear for reply, but it is the last line of my code, so how can code be instered in response buffer
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without seeing any of your code, who can say?

Please post the relevant parts of the code, being sure to UseCodeTags.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic