Eclipse配置Tomcat服务器和Dynamic Web Project的问题

 

 

在eclipse配置tomcat的时候,我发现在Eclipse---Preferences---server---Runtime Environment中,点击“Add”按钮,里面看不到tomcat的,只有个“J2EE Runtime Library”。 

 
解决办法:
  1. Help -> Install New Software
  2. Choose "Luna - http://download.eclipse.org/releases/Luna" site
  3. Expand "Web, XML, and Java EE Development"
  4. Check JST Server Adapters (version 3.2.2) and  JST Server Adapters Extentions

 

如果原生的Eclipse没有Dynamic Web Project, 需要安装以下plugin. The list is:

  • Eclipse Java EE Developer Tools
  • Eclipse Java Web Developer Tools
  • Eclipse Web Developer Tools
  • Eclipse XML Editors and Tools

 

Apache Tomcat的设置

Setting the JAVA_HOMECATALINA_HOME Environment Variable on Windows

One can do using command prompt:

  1. set JAVA_HOME=C:\ "top level directory of your java install"
  2. set CATALINA_HOME=C:\ "top level directory of your Tomcat install"
  3. set PATH=%PATH%;%JAVA_HOME%\bin;%CATALINA_HOME%\bin

OR you can do the same:

  1. Go to system properties
  2. Go to environment variables and add a new variable with the name JAVA_HOME and provide variable value as C:\ "top level directory of your java install"
  3. Go to environment variables and add a new variable with the name CATALINA_HOME and provide variable value as C:\ "top level directory of your Tomcat install"
  4. In path variable add a new variable value as ;%CATALINA_HOME%\bin;

 

Tips

1. 安装时一定要以管理员权限安装,否则以后会有权限的麻烦。

2. 如果在运行时出现Catalina.log <access denied>的error,可以通过修改Top level tomcat directory权限的方法使用户获得读写权限,进而解决问题。

posted @ 2016-04-11 15:23  Ray.Yang  阅读(530)  评论(0编辑  收藏  举报