1、windows—preferences—Server—Runtime Environmentsjava
2、“Add”按钮,选择Tomcat v6.0web
3、Tomcat installation directory右边的Browse,选择Tomcat安装目录,JRE选择jdk1.6.0_30apache
4、JRE右边的Installed JREswindows
5、配置了JDK—Directgry路径C:\Program Files\Java\jdk1.6.0_30tomcat
6、建立一个server,file—new—others—server—apache—tomcat6.0—browse选择tomcat安装路径ide
7、下面窗口server中右键—startui
8、把web项目添加到这个servlet中,右键—add and removespa
9、建立dynamic web projec,通常把default output folder改成WebContent\WEB-INF\classes 详见:E:/java/如何在eclipes里开发web项目server
9.1windows->Preferences->general->Workspace 右侧Text file encoding,选择Other,改变为UTF-8ip
十、
咱们常常会把别人的项目copy到本身这里进行二次开发或者参考。提示HttpServletRequest 不能引用
Action:
Project ->Properties -> Java Build Path -> Add Library -> Server Runtime ->next -> 选择你的Server -> Finish
导入的项目jdk版本不一样,换成本机的jdk
Alt+enter- JavaBuild Path -> Add Library->jar system Library
十一、堆栈、内存溢出
选择run configurations
在最后添加,注意:空格
-Xms512m -Xmx1024m -XX:PermSize=256M-XX:MaxPermSize=512M
十二、
Eclipse操做技巧
用alt+/手动控制自动提示(推荐) Window->preferences->General->Keys 找到Content Assist,首先Remove Binding(移除绑定),而后再Binding(按下Alt+/) When中选Editing Text就能够,OK
Alt +/自动带出代码
1三、 不能把其余项目的文件夹copy过来,报错is out of sync with file system
选中项目-F4刷新