在eclipse当中如何做一个jsp的helloWorld?


1.jsp的helloWorld:
做jsp的实验步骤非常简单。在eclipse当中,右键点击代表你WebModule的根目录的WebContent。new/jsp 即可。

例 1.1

<%@ page contentType="text/html; charset=GBK"%>

<%!private int accessCount = 0;%>
<%!double called() {
        return Math.random();
    }%>
<%=++accessCount%>
<%
    if (called() < 0.5) {
%>
天气好
<%
    } else {
%>
天气不好
<%
    }
%>



更多内容请见原文,原文转载自:https://blog.csdn.net/qq_44594371/article/details/103167490