how can i include jsp page in html?

后端 未结 2 1663
执笔经年
执笔经年 2020-12-19 12:46

I am using Netbeans and MySql server. I want to add JSP content into an HTML file. How can I include it?

2条回答
  •  Happy的楠姐
    2020-12-19 13:04

    JSP is a dynamic one. It needs a web container to get executed. Why do you need to include it in a static html page. To my knowledge, if you want to include a jsp page in a html page, then your page is intended to be dynamic. So you have to change that to be a JSP page. Now you can use

    <%@include file="includeable.jsp" %>
    

    This will include your jsp.

    You cannot include a JSP to a HTML page.

提交回复
热议问题