Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8381545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:43:19+00:00 2026-06-09T16:43:19+00:00

i have deployed a REST web service and the service return String as a

  • 0

i have deployed a REST web service and the service return String as a response.
When i send cross domain jQuery ajax request i get ‘parsererror’.

Below is Spring Controller:

@RequestMapping(value="/TestService",method=RequestMethod.GET)
@ResponseBody
public String testServiceGet()
{
     return "This is GET";
}

Below is jQuery ajax() method:

$.ajax({
    url: 'http://localhost:8080/Example_REST_WS_Deploy/service/TestService',
    dataType: 'jsonp',
    crossDomain: true,
    contentType: 'text/plain',
    success : function(data, textStatus, xhr) {
       alert(data);
    },
    error : function(xhr, textStatus, errorThrown) {
       alert("Error ->" + textStatus);
    }
});

The error which we received in FF browser error console is as below:

SyntexError: missing ; before statement
This is GET
-----^

Please help as soon as possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:43:20+00:00Added an answer on June 9, 2026 at 4:43 pm

    Finally it solved.

    I remove the contentType: 'text/plain', from the ajax method and it’s working fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a REST-like web service that is deployed on Tomcat. There is no
I have a REST web service which I created previously and deployed in Tomcat7.
I have deployed an asp.net site with a wcf rest service to a virtual
I have implemented a RESTful web service using jersey and deployed it on Tomcat,
I have jersey REST channel deployed on weblogic. All methods are configured to return
I have deployed a simple REST based application in RAD. A simple URL is
i have deployed my wcf service on IIS.. Its giving me this error when
I'm trying to get a simple REST service to work with Spring 3.0 but
I ve created a sample REST web service which writes some data in a
I have a Java REST webservice deployed on tomcat (http://localhost:8080/myrestfulapp/aservice/). In my qooxdoo app,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.