Tomcat integrates with Eclipse, server name is gray and no content

Source: Internet
Author: User
Tags tomcat

When building the tomcat environment in Eclipse on Ubuntu, after Tomcat,server is configured, test a Web project and run it without Tomcat to choose, and the server Name column is grayed out. As follows:


Solution:
1. First your eclipse configuration needs to revert back to the reload state, but Eclipse does not have this feature, but you can replace a new workspace, File-switch Workspace-other, in the new workspace, The original configuration is not available.
2. Re-add the servers. Window-showview-servers. Then right--new-server in servers and add the Tomcat version on your computer. Finally click Finish, you may see the following prompt:/opt/tomcat/conf/catalina.policy (insufficient permissions), as shown:


Click Ok-finish directly to complete the Add.
3. At this point, the following files should be available under <eclipse workspace>/servers/<tomcat version> Server at Localhost-config:
Catalina.policy
Catalina.properties
Context.xml
Server.xml
Tomcat-users.xml
Xml
When I view my Eclipse workspace, the above files are not in the corresponding folder, in order to solve this problem, you need to copy these files from the/opt/tomcat/conf folder to <eclipse workspace>/ Servers/<tomcat version> Server at localhost-config below.

www.linuxidc.com @linuxidc:/opt/apache-tomcat-7.0.27/conf$ ls-la

Total Dosage

drwxr-xr-x 2 root root 4096 March 22:45.

drwxr-xr-x 9 root root 4096 June 00:59.

-rw-------1 root root 11955 March 22:45 catalina.policy

-rw-------1 root root 5402 March 22:45 catalina.properties

-rw-------1 root root 1394 March 22:45 context.xml

-rw-------1 root root 3288 March 22:45 logging.properties

-rw-------1 root root 6435 March 22:45 server.xml

-rw-------1 root root 1530 March 22:45 tomcat-users.xml

-rw-------1 root root 152716 March 22:45 web .

www.linuxidc.com@linuxidc:~/java/test/servers/tomcat v7.0 Server at localhost-config$ sudo cp */home/bobo/java/ test/servers/tomcat\v7.0\server\at\localhost-config/

4. Change the permissions of these files, or you will get an error.

Www.linuxidc.com@linuxidc:~/java/test/servers/tomcat v7.0 Server at localhost-config$ sudo chmod 777*
5. Click Eclipse's servers, press F5 (refresh), or right--refresh.


Article reprinted from: http://jingyemingyue.iteye.com/blog/1849880



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.