Eclipse本地如何运行纯静态网页项目
在eclipse新建一个static web project
将index.html放在WebContent下
在server下点击new,选择basic->http-preview
点击start如果出现端口被占用的错误
右键点击选择http-preview的properties在general的Switch Location将Location改变为系统默认的另一个路径,如图。(这是相对工程路径下的
在工作空间下选择HTTP Preview at localhost.server文件
以记事本方式打开,添加 port="端口号可以根据需要填写"
右键项目run as选择已配置的http-preview
点击finish