右键项目的Properties -> Java Build Path -> Libraries -> Add Library -> Server Runtime里选入所需的库(需要配置的服务器),一般是tomacat,就OK了