解压缩Apache tomcat v7.0到d盘根目录下
设置window-preferences-java-installed jres
只保留并选中jdk1.7.0_75
设置网页文件编码格式
window-preferences->web->html files/jsp files->utf-8
设置window-preferences-Server--Runtime environments
新建:Dynamic动态的 Web Project
如果Target runtime为none,点击New Runtime按钮
下一步...选中Generate web.xml deployment descriptor
在WebContent目录下新建html/jsp文件
在java resources>src目录下新建Servlet,重写doGet(),或doPost()方法
要将网页文件(.html,.jsp,.htm)和资源文件(.jpg,.gif等)
都放在WebContent目录下;注意:不要放在WEB-INF下面.