以 Tomcat 为例子,静态文件,如 html, css, js ,无需编译,所以只需要把文件复制到 Tomcat/webapps 目录下面某个子目录,便可以了。

 

例子:

1. 在 Tomcat/webapps 目录下,新增文件夹 tt

2. 在 tt 文件夹中新增文件 test.html

3. 启动 Tomcat ,使得能访问 localhost:8080

此时,通过浏览器访问 http://localhost:8080/tt/test.html 就可访问到新增的 test.html 文件。

 

相关文章:

  • 2022-12-23
  • 2022-01-24
  • 2021-05-21
  • 2022-12-23
  • 2021-09-05
  • 2022-12-23
  • 1970-01-01
  • 2022-01-07
猜你喜欢
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-11-13
  • 2022-12-23
相关资源
相似解决方案