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
Related
Im teaching myself servlets, found some very good tutorials and have great success in Eclipse Neon EE. (very basic servlet that just serves a simple static web page)
I installed Tomcat standalone before installing Eclipse Neon EE, and tested it and I get the regulat apache tomcat page. The tutorials I found also guided me on how to set up the tomcat server in Eclipse. They also showed me how to create a project and servlet. Even though I use 3.1, I still have Eclipse create the web.xml file.
When I run my servlet, Eclipse starts up Tomcat and does everything, and opens a browser tab within Eclipse and it takes me to http://127.0.01:9999/first/Hello and it serves up my web page. No problem. So now I export my project as WAR file, tell Eclipse to put the .war file right in my tomcat8's ROOT dir. Then i stop the tomcat8 server in eclipse and shut down eclipse. Then I use startup.bat and tomcat comes up, but then I cannot surf to http://127.0.01:9999/first/Hello from this same PC, it just gives 404 with "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."
Im not quite sure what steps I am missing?
You have to put your war file (first.war) into the "webapps" subdirectory, not into the root Folder of your tomcat server. Have a look at : How to deploy a war file in Tomcat 7
Copy the .war file (first.war) to %CATALINA_HOME%\webapps ( E.g.: C:\tomcat\webapps )
Run %CATALINA_HOME%\bin\startup.bat
Your .war file will be extracted automatically to a folder that has the same name (without extension) (E.g.: hello)
...
I have created a dynamic web application using eclipse. it consist of java servlet and jsp and it run on tomcat 7.2.it runs fine under any browser if run it through a eclipse, copy the address and paste it in browser while eclipse is running. I wish to run this application without running eclipse. for this i run the tomcat manually using startup command. however than when i use the website address of my web site in the browser it says resource not found. I want to run this without actually running eclipse. any suggestion please.
You'll need to deploy the war file that was built by Eclipse to your new Tomcat server. You can just copy it to <tompcat-instrallation-path>/webapps location. It will be exploded by Tomcat automatically and you'll be able to see your pages at:
http://localhost:<port>/<name-of-your-war>/...
Where <port> is usually 8080 if you didn't change it in Tomcat's config and <name-of-your-war> is the name of your war without .war extension.
You will need to take the built war file, name it ROOT.war, and place it in the /webapps directory in your tomcat directory. Tomcat gives instructions for this, you will replace the ROOT.war that is there by default. You should also check to make sure you are using the same port on which Tomcat is running.
I want to deploy my helloworld project to my wildfly (former jboss) application server.
I can use maven mvn install wildfly:deploy and it will deploy the app.
But when I want to use eclipse to run on Server it does nothing.
I don't get a console output or anything which looks like building and deploying.
I added the server runtime to the project and also added the wildfly server.
Why is Eclipse not deploying?
This works for me: do a mvn install in order to build the war and have it at the target folder. Then right-click on wildfly-server. You will see an add-remove option. Click on it, select your project from the list and then add your project to the server. Click finish. If the server is running the project should be deployed.
Another approach would be to simply copy the war from your target directory and place it in the standalone/deployments folder of your wildfly installation.
Make sure that you have stopped the server before copying the war. After you have copied the war to the deployments folder, start he server.
Your application should be deployed successfully.
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
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