Eclipse running a web app on an existing tomcat installation - eclipse

I have an existing tomcat server running on my local machine that is being started from outside of eclipse. Is there a way to deploy my web app from eclipse to that tomcat instance without having eclipse trying to start that instance of tomcat?

It's possible using ANT scripts in eclipse which will deploy war file into tomcat directory and tomcat will take care rest of the things.
For those ant scripts you can see this below links
How Apache Ant deploys .war file to Tomcat
http://www.coderanch.com/t/423905/tools/automate-deployment-war-Tomcat-through

Related

Eclipse with Tomcat7, where my application is running from?

When working with Apache Tomcat I know to look for my .war file in %CATALINA_HOME%/webapps. Running Eclipse MARS with Tomcat plugin - the webapps directory is empty.
Eclipse is installed at C:/eclipse/
Tomcat is installed at C:/tomcat7/
Using Windows 10 and Java 1.8.0_131
JAVA_HOME=C:/Program Files/java/1.8.0_131/
CATALINA_HOME=C:/tomcat7/
From where Eclipse with its Tomcat plugin is running my web application?
The default setting of the eclipse tomcat plugin (WTP) would configure a separate server instance which its root folder is specified by CATALINA_BASE. This server instance will has its own configuration and webapps folder under CATALINA_BASE.
The value of the CATALINA_BASE can be configured from the following UI:
So , in the above configuration , the war will be deployed to $project_workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\

Connecting eclipse to my server

I'm not sure if this is possible, but we are doing a dynamic web project in school, (java,html,css,mysql) and we have a home server running (apache, tomcat, php, mysql) is there a way to connect Eclipse to that server so that i dont always have to pack a new war file and upload it through tomcat manager ? It would be easier if the result could be seen instantly on the server.
Eclipse supports local tomcat deployment. To deploy to a remote tomcat you can either use Maven or Ant.
There is a cargo plugin as well but personally I have not used. My preference is maven plugin.

How to deploy a web application on Jetty

I create a war file , then i executed in eclipse, like described here.
I don't know configure the context path, how can I run the war file?
There are two ways you can run your webapp using Jetty Server
Configure jetty server using Jetty_WTP_Plugin and run webapp within eclipse
Download stand alone jetty server from Jetty Distributions from Eclipse
If you use second option, you need to create war file keep war file interface /webapps folder.
I haven't used jetty but I know that its quite similar to tomcat. Just place your war file (say foo.war) in webapps directory; Start jetty by the following command in
java -jar start.jar
and hit http://localhost:8080/foo in your browser
By the way the tutorial you're using is quite an old one and may not work for jetty 8 or 9

Deploy and debug application on OC4J in eclipse

I have a tomcat webapp project checked out in eclipse (call it 'xyz'). I use eclipse tomcat plugin with Devloader. Everything runs fine. etc, etc, happy.
Now I want to run the same project on OC4J app server and debug in eclipse. For that, I have downloaded and installed standalone OC4J server. I created a OC4J server instance in eclipse. Question is how do I deploy the earlier checked out project 'xyz' to run on OC4J server in eclipse.
Additionally, is there any plugin for OC4J similar to tomcat in eclipse, that makes life easier.
Thanks in advance for your replies.
Package your application in an EAR file and deploy it to OC4J
Start OC4J with VM arguments that enable remote debugging (See http://docs.oracle.com/javase/1.4.2/docs/tooldocs/solaris/jdb.html)
Create a Debug Configuration of type Remote Java Application in Eclipse, and use that to connect to the running VM

Deploying GWT app to tomcat in eclipse

I want to use tomcat server in development mode with GWT. When I use embedded Jetty it deploys application to the current directory(where my war folder is located). So it generates all the files there. How can I configure eclipse to use tomcat server and all the deployment stuff to be copied to tomcat webapps directory. I have tried to use -noserver option in Run conigurations, but it doesn't copy any resource from war directory to server deployment directory.
Can I use tomcat server in such manner?
P.S. i want to solve this problem withou ant or maven
Using my own server in development mode instead of GWT's built-in Jetty instance
You will need to copy the contents of the WAR folder over, but only once.
Have you looked at Eclipse WTP? It allows deploying to a server right from within Eclipse.
For a GWT project, you'd then, in addition, follow that recipe: http://code.google.com/eclipse/docs/faq.html#gwt_in_eclipse_for_java_ee