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 7979483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:47:33+00:00 2026-06-04T09:47:33+00:00

I have a problem while returning jsp from controller using ajax+spring mvc. I want

  • 0

I have a problem while returning jsp from controller using ajax+spring mvc. I want to refresh a piece of the full page. In fact this is display-tag table. My controller send me this page, but the data that back to me from a controller is a jstl tags it is not html page. So browser, certainly, do not show me that page.

$(document).ready(function() {
    alert("asdfads");
    //$('#content').load('<c:url value="/pages/new.jsp"/>');
    $.ajax({    
        url : '/shop/getCartProducts/ajax/',
        type : 'GET',
        async: false,
        data : {},              
        success : function(data) {
            $('#content').html(data);
            alert(data);                                                
        },
        error: function (jqXHR, textStatus, errorThrown) {
            alert(jqXHR + " : " + textStatus + " : " + errorThrown);
        }
    });
});

My Controller Looks like this

@RequestMapping(value = "/getCartProducts/ajax/", method = RequestMethod.GET)
String ajaxGetProdCart(HttpServletRequest request, Model model) {
    LOG.error("We are in the controller");
    PaginatedListImpl<Product> paginatedList = new PaginatedListImpl<Product>(request);
    productService.getProductsFromCart(paginatedList, null, 100);
    model.addAttribute("paginatedList", paginatedList);
    return "cartProduct";
}

cartProduct.jsp

<display:table class="table" id="product" name="paginatedList" defaultsort="1" requestURI="/shop/cart/" excludedParams="*" export="false">
<display:column>
    <a href='<c:url  value="/cart/remove/"/>'> <img
        src='<c:url value = "/resources/images/forbidden.png"/>'>
    </a>
</display:column>
<display:column sortable="false" sortProperty="name" title="Product"
    maxLength="55">

    <c:url var="prodUrl" value="/product/${product.product_id}/" />
    <a href='<c:out value="${prodUrl}"/>'> <c:out
            value="${product.name}" />
    </a>
</display:column>
<display:column property="price" paramId="price" sortable="false"
    title="Price" href="#" />
<display:column property="descr" sortable="true" paramName="descr"
    title="Description" maxLength="250" sortName="descr" /></display:table>

Alert show me this code it not show me html.

  • 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-04T09:47:34+00:00Added an answer on June 4, 2026 at 9:47 am

    If what you showed us is the full code of the JSP, then you simply forgot to declare the two taglibs at the top of the JSP:

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="display" uri="http://displaytag.sf.net" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing some problem while returning data from web services. I am using
I have problem while using jquery maskedinput with asp.net textbox. I have a check
I have a problem returning/processing JSON data while calling $.get() function. Here's the code:
I have been facing a strange problem while returning dataset through WCF service (WSHttpBinding).
I have a problem while converting a string whose value is dd.mm.yyyy to DateTime
I have a problem while pasting my contents (or text) generated by Java code
I have a problem while executing a SSIS script component. To be honest I
I have a problem while scrolling images on tableview. I am getting a Signal
i have a problem while loading a UITableView on UITabBarController, i got this error
I have a problem while publishing on the Market. My application does not use

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.