第一个jsp---page(外加web.xml)

jsp代码

1 <html>
2 <body>
3 <center>
4 NOW time is:<%=new java.util.Date()%>
5 </center>
6 </body>
7 </html>
View Code

你会发现没加

1 <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
View Code

其中的web.xml

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <web-app version="2.5" 
 3     xmlns="http://java.sun.com/xml/ns/javaee" 
 4     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 5     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
 6     http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 7   <display-name></display-name>    
 8   <welcome-file-list>
 9     <welcome-file>index.jsp</welcome-file>
10   </welcome-file-list>
11 </web-app>
View Code
原文地址:https://www.cnblogs.com/sxmcACM/p/3443880.html