I want to deploy WAR package when I build it with Netbeans on remote server.
One solution that I found is to use maven-cargo plugin. Have you tried this plugin with JBoss and WebLogic? But are there other options?
For Weblogic
Netbeans 8.1 allows you to add a remote Weblogic server.
Right click on Servers and select "Add Server" -> "Remote Domain"
For JBoss, Tomcat etc.
I secure copy my war to the remote server on the command line to the auto deploy or webapps directory.
It's quick and easy in my opinion.
(Maven cargo gave me grey hair...)
Related
I've got a Spring MVC Maven project written in Eclipse that was verified as working with an Apache Tomcat 7 as the web container.
I am trying to transfer it to my "server" pc where I want to deploy it to the my existing glassfish (4.1) server as the web container.
I am having a very hard time finding a big enough partial answer to get the rest of the way.
I have tried to just export the .war file to the autodeploy folder which resulted in a "deployfailed" file.
I have tried to setup a "new server" using glassfish tools, but I realized that this is creating a new server and the existing server blocks the socket connection.
Eclipse doesn't see to have standard web commands like build, clean or deploy, but I would happily settle for advice on how to tell it to deploy to the existing glassfish server similar to how I was able to with tomcat at my training location.
Check this answer. Then follow the following steps.
Go to the project in the Project Explorer.
Select the web project.
Right click and select "Run As", you will see glashfish. Select it and click run.
I am relatively new to Java but need to do some changes to Java code. I prefer using Visual Studio Code for this. The Java code builds to .WAR file using Maven and is deployed to Tomcat.
Is there any way to debug this app directly from Visual Studio Code?
Visual Studio Code has a lot of tools to do this in marketplace.
For Tomcat you can use this:
https://marketplace.visualstudio.com/items?itemName=adashen.vscode-tomcat
You can do all this things:
Add Tomcat Server from Tomcat Install Path
Start/Restart Tomcat Server from VSCode
Run war package on Tomcat Server
Debug war package on Tomcat Server
Run exploded war on Tomcat Server
Debug exploded war on Tomcat Server
Open server homepage in browser to check all deployed war packages
View all deployed war packages in Tomcat Explorer
Open war package homepage in browser
Stop Tomcat Server
Rename Tomcat Server
Customize JVM Options when starting Tomcat Server
Reveal deployed war packages in file explorer
Delete deployed war package
You need the debugger posted by Mert Mertce tho.
I've been able to configure my tomcat server in Intellij and have been able to run the server successfully. However, I can't seem to find where to actually add my project to the server in intellij. I'm used to using eclipse where I would right-click my server and use the "Add and Remove" feature for the server. Is there something similar in intellij?
Firstly, you can find the configuration page of server,
And add a new tomcat server,
and then set the webapp home as you need in the new server,
At last, the new server is the server you need.
Create a web Facet at File - Project Structure
Create an Artifact from this Facet at the same page
Add a tomcat run configuration at Run - Edit configurationes, go to the Deployment tab, add you artifact to Deploy at the server startup
I started my journey into web applications about three years ago and I'm happy to say that I've finally deployed a working website. My concern is that to deploy the website I use the Eclipse IDE and a Tomcat webserver. So basically I right click the project in Eclipse and then choose "Run As > Run on Server" and then select the Tomcat server I downloaded - from that point on the console spits out some startup messages and my website is online and ready for use. What are are some of the drawbacks of deploying a project this way. I've read just briefly about WAR files and adding them to Tomcats Webapps folder but I could neither get that working nor did I understand completely the process...so is it acceptable to just deploy the project the way I have been doing thus far by running it in Eclipse?
Generally Development machine and deployment server is different.
On Deployment server one may not have eclipse always.
WAR file is just a webarchive which includes all the necessary files. WAR makes your project portable.
Export WAR from eclipse place it in tomcat webapps in any machine and restart tomcat.
You should have your webapp successfully running on that machine.
That's a fine way for deploying a server when you're learning, or always have the server (the only server!) running on your development machine.
If you need to push to a remote machine, it won't work, and you'll need to learn other methods then, but for now, what you're doing is fine.
I wrote a small servlet and jsp project on eclipse and tomcat 5.5, but I don't know with works I do for make that a real site on a real host. Should I war them or I should upload project on host? My host should have which properties? I really don't now how to start?
I would recommend packaging them in a war and deploying it out to the remote tomcat server. Its not a good idea to deploy an unpackaged project directly to the server unless your debugging or testing. Once you have a finished project ready to deploy package it to a war. I typically deploy to server using the tomcat manager page. Just browse for the war, click the upload button and it should start right up. On my local machine this is the url that I use to upload to the server http://localhost:8080/manager. The server itself should have the same properties and settings that you are using in your eclipse workspace, and I would highly recommend that it be the same version as well. The war can also be dropped into a directory on the remote host and Tomcat will load this on startup, this location will vary depending on the host.