JSP页面标签使用说明

 

1.jsp页面中引用java代码

   >>情况1

   <%
        Integer mainType = (Integer) request.getAttribute("type1");   
       String display = "none";
        if (mainType.intValue() == 0)
       {
        display = "block";
       }
  %>

  >>情况2

     <label  text='<%=request.getAttribute("type1")%>' />

2.引用jsp页面中的Java变量

  <div style="display: <%=display%>"></div>

3.

你可能感兴趣的:(java,jsp,String,Integer,div)