Eclipse配置Tomcat服務器和Dynamic Web Project的問題

 

 

在eclipse配置tomcat的時候,我發如今Eclipse---Preferences---server---Runtime Environment中,點擊「Add」按鈕,裏面看不到tomcat的,只有個「J2EE Runtime Library」。 java

 
解決辦法:
  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:tomcat

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

 

Apache Tomcat的設置eclipse

Setting the JAVA_HOMECATALINA_HOME Environment Variable on Windowside

One can do using command prompt:code

  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:server

  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;

 

Tipsip

1. 安裝時必定要以管理員權限安裝,不然之後會有權限的麻煩。it

2. 若是在運行時出現Catalina.log <access denied>的error,能夠經過修改Top level tomcat directory權限的方法使用戶得到讀寫權限,進而解決問題。io

相關文章
相關標籤/搜索