Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
Success function not executed even after successfully execution of controller method

Ajax call:

$.ajax({
        type: "GET",
        url: "/promoPricing/promoDiscountDetails",
        data: { 
                materialId : $("#materialId").val(), 
                soldToID :  $("#soldTo").val()
              },
        success: function(result){
            alert("success!");
            console.log(result);
        },
        error: function(eh){
            alert(eh);
            console.log(eh)
          alert('error!');
        }
    });

Controller Method :

@RequestMapping(value = "/promoDiscountDetails", method = RequestMethod.GET)
    public String getDiscountDetails(final Model model) 
    {
        return "hello";
    }

console.log(eh): responseText: "<!doctype html><html lang="en">HTTP Status 404 – Not Found<style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}HTTP Status 404 – Not Found"

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You are getting a 404 Error response, this is not a successful request. It looks like your GET URL and doesn't match your controller's mapping.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!