Ajax和Servlet集成[重复]

This question already has answers here:
                </div>
            </div>
                    <div class="grid--cell mb0 mt4">
                        <a href="/questions/4112686/how-to-use-servlets-and-ajax" dir="ltr">How to use Servlets and Ajax?</a>
                            <span class="question-originals-answer-count">
                                (7 answers)
                            </span>
                    </div>
            <div class="grid--cell mb0 mt8">Closed <span title="2016-05-18 07:20:35Z" class="relativetime">3 years ago</span>.</div>
        </div>
    </aside>

I want to send the text using $.get() (ajax) function to a servlet for converting into image, and save it into sql database. After storing image into database i want to get the image as response in my page.

</div>

what you want to send by ajax, image or data?