我在尝试安装TomCat服务器时遇到了很多困难而不是浪费时间,无论如何我可以在线运行一些java服务器页面代码吗?我的时间很短,需要在下面编译这个代码并找出错误。如果有人可以带我到一个可以在线编译JSP的网站,这将是非常好的!谢谢你的帮助
<HTML>
<HEAD>
<TITLE>JSP Debugging</TITLE>
</HEAD>
<BODY>
<% import java.io.*; %>
<% import java.util.Date; %>
<% import java.util.Enumeration; %>
<%
response.setContentType("MIME");
Date today = new Date(12,20,2004);
Date created = new Date(session.getCreationTime());
Date lastAccessed = new Date(session.getLastAccessedTime());
out.print("<h1>Today is " );
out.print(today);
out.print("</h1>" );
out.print("This session has the following characteristics:<br>" );
out.println("<br>ID: ");
<%= session.getId(); %>
out.println("Created: " + created);
out.println("Last Accessed: " + lastAccessed);
out.println("<br>Max Inactive Interval: " +
session.getMaxInactiveInterval());
%>
</BODY>
</HTML>
答案 0 :(得分:2)