项目——webcontent——new(右键)——jsp file(file name—项目名称—index1.jsp)——finish——1、先下载一个eclipse 安装

打开eclipse window——preferences——server——runtime——add——添加自己tomcat的版本(我的是9.0.31版本)——next——brows(添加tomcat的路径)——apply and closejsp—eclipse配置

 

 

 jsp—eclipse配置

 

 

 jsp—eclipse配置

 

 

 2、server 点击蓝色部分jsp—eclipse配置

 

 

 jsp—eclipse配置

 

 

 点击自己的tomcat版本,finish;

3、file——new——other——web——dynamic web project——next——project name(项目名称)——target runtime(服务器—选择tomcat的版本)——next——next——finishjsp—eclipse配置

 

 

 jsp—eclipse配置

 

 

 3、项目——webcontent——new(右键)——jsp file(file name—项目名称—index1.jsp)——finish——双击左键,打开,写入index1

启动服务器 sever——tomcat——右键——add——finish——右键——start

 

 浏览器——域名+项目名+文件名(index1.jsp)(浏览器可以直接访问)jsp—eclipse配置

 

 (注意:WEB-INF文件中的文件,浏览器不能直接访问)

配置tomcat运行时环境:项目右键——build path——libraries——add libraries——sever runtime

jsp—eclipse配置

 

 配置汉字编码:

A、编码分类

a、设置jsp文件:

c、设置浏览器读取jsp文件编码。

B、方法:

a、将ISO-8859-1换成“utf-8”jsp—eclipse配置

 

 b、window——preference——jsp files——encoding——选择utf-8

 

相关文章:

  • 2022-12-23
  • 2021-11-14
  • 2021-09-22
  • 2021-07-28
  • 2021-10-04
  • 2021-12-10
  • 2022-01-07
猜你喜欢
  • 2022-02-26
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2021-11-30
  • 2021-11-29
相关资源
相似解决方案