1

i have multiple jsp files(contains html) in webapp/views of my application and i want to do something like this in one jsp file

$("#my_div_id).append("my_file2.jsp")

requirement :
i want to inject a particular html content which i stored as jsp in a div block of other jsp file through jquery.

tried : $(#id).load("file2.jsp") and its not working and came to know it makes ajax call and fetches remote content only

thought of another approach by keeping my html content in <script type = "html"> of first jsp file itself but unable to figure out how to push that html in script tag to required div element

saw other answers answer 1 answer2 but unable solve my requirement

Satyaaditya
  • 537
  • 8
  • 26

0 Answers0