A
A
artshelom2017-11-23 20:30:15
HTML
artshelom, 2017-11-23 20:30:15

How to add a .jsp file to the page so that you can write certain parameters??

I have 2 questions:
1. If I am writing a spring project, do they use html or jsp now??
2. I send a post request from the page, returns json data (for example: as in VK when scrolling new posts). How to fill in the "div", which is in another file, according to this data and how to fill it??
for example this code:

$.ajax({
            type: 'POST',
            url: '/news',
            dataType: 'json',
            success: function(json){
                alert(json) //Вот пришел ответ, а как теперь заполнить взять div из другого файла и отправить туда данные на заполнение??
            },
            error: function(){
                alert('error')
            }
        });

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question