1.5 第一个JSP页面
接下来我们来创建第一个jsp页面
首先我们要明确:所有jsp页面都必须在WebContent文件夹下,但是一定不能在WEB-INF文件夹下
如图所示,在WebContent文件夹上右键点击,选择新建,然后选择JSP File :
点击下一步后,弹出框要求写入文件的名字,这里我们输入hello,注意不要删除了.jsp后缀:
点击完成后就打开新建的jsp页面,我们用下面的代码覆盖jsp里面所有的代码:


<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Insert title here</title></head><body> <% out.println( "hello world!" );%></body></html>