Jsp study notes

1. Introduce jsp in html and output 100

在html中嵌入jsp
  <%
    out.print(100);
  %>

 

2. Use Variables

 

<%
    String today="2018.5.24";
  %>
  今天是<%=today%>

3. Set page information

<%@page info="作者:Ai<br> 时间:2018年5月24日23:06:36<br>" %>

Get page information

该网页信息为:<%=getServletInfo()%>

4. Use the include directive to include multiple jsp pages

When part of the content needs to be repeated, we can extract it separately, and all netizens who use this part use this jsp.

When the jsp is updated, the content of all pages that use the jsp will change.

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

 

Published 25 original articles · Likes6 · Visits 10,000+

Guess you like

Origin blog.csdn.net/qq_37446649/article/details/80445162