Having hard time to publish files to Tomcat from Eclipse

ぐ巨炮叔叔 提交于 2019-12-25 04:39:06

问题


Sorry if my question seems dumb. I've started using Eclipse Ganymede 3.4 this week and having hard time publishing my projects to the web app server.

First of all you need to know this issue:
i installed my Tomcat 6.0.18 from Netbeans that i use for PHP and J2SE project. While i can start that server from either Netbeans or Eclipse, it can not start manually for some reason even though i setup my JAVA_HOME correctly pointing to jdk/bin it's saying it's a jre. it a bit weird but i can use the IDE to get going. i did some research on the net and find out that eclipse doesn't publish to tomcat.

In fact i always develop by having a local copy on other drive than C where XP is installed and publish to a server installed on C.

So where i need to find a way to publish to Tomcat under C.
It there any simple way to do that?

Please share your experience.

Thanks for reading

Ps : i know that i can use Netbeans but i'ld like to use Eclipse and use its wysiwyg thanks!


回答1:


WTP (Web Tools Platform) should get you what you need. It's a set of Eclipse plugins which includes a one to start/stop/debug Tomcat and publish to a local Tomcat installation.

http://www.eclipse.org/webtools/

You can download a version of Eclipse that already includes WTP: Eclipse IDE for Java EE Developers.




回答2:


I admit this is not the best practice for a general case, but in my local development environment I created a separate Tomcat environment and I simply store the project itself in this Tomcat's webapps directory. This way the 'deployment' is implicit and instant.

Of course when I need to do changes in the code which cannot be incrementally added during a debug session, I have to restart the Tomcat.



来源:https://stackoverflow.com/questions/1052704/having-hard-time-to-publish-files-to-tomcat-from-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!