Eclipse with Tomcat7, where my application is running from? - eclipse

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\

Related

make tomcat take project from workspace

I am working on ubuntu 14.04, have downloaded tomcat7 and then eclipse luna.
I added Tomcat7 to eclipse and started the server. I have changed the port to 3030. When i hit the lolachost:3030, I get a blank page whereas when i deploy a project on server this is the log i see.
org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/tomcat7/webapps/first
This is not my workspace path, and it shows 404 page on browser. i need to configure tomcat7 to point my workspace?
Have you tried to Add project to Tomcat Server in Eclipse ?
View "Servers" -> your tomcat server -> "Add and Remove"
I think simply running from localhost cannot run your project, first From eclipse run on server, get the url run it on any browser.

deploy my project directly without copying always the war file

I'm running a web application with maven + spring mvc + spring data jpa with apache tomcat in eclipse.
I want to deploy my application without opening eclipse and run tomcat inside it, so i have to export my project into war and copy it into apache-tomcat-7.0.42\webapps directory and it's working good.
My problem is that i want to work directly into apache-tomcat-7.0.42\webapps with eclipse so like that i don't have to export my war file after every changes in my code.
Just configure the Tomcat as server in eclipse and run the project from eclipse.
To configure tomcat in eclipse:
In Eclipse, go to Windows->preferences->Servers->runtime Environment, add tomcat here.
To run the project from eclipse:
right click project in Eclipse's project explorer and select->run as->run on server. select the tomcat you configured.

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

Eclipse running a web app on an existing tomcat installation

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

missing jars when publishing a web app to glassfish with eclipse juno and maven integration

I use eclipse juno with GlassFish Server Open Source Edition 3(java EE6), m2e and maven 3.0.4.
When I create a war file by 'mvn package' command and deploy it to a glassfish,
the war file works just fine.
However, when I publish a web app to a glassfish from the server view of eclipse,
the web app fails.
I guess the reason of this failure is that publishing from eclipse is not configured correctly
to get jars from my maven repository and then jar files in eclipseApps//WEB-INF/lib directory are missing.
Can I configure eclipse to use a maven configuration when publishing a web app to a glassfish?
Thanks.
I found the answer
"anyway I solved the issue by adding following row Properties > Deployment Assembly: /target/myapp/WEB-INF/lib -> WEB-INF/lib"
in
Glassfish Deployment out of Eclipse Helios SR2 fails
Thanks.