Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

113
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda