What is my webserver webapp directory? - maven

I'm new at Maven and I'm following a tutorial where I learned how to create a Maven web app and now I want to run it from Eclipse IDE. In this tutorial the last step is this:
I don't understand how can I find my webserver web app directory and how can I restart my webserver. Someone explaining me this?
Regards,

If you want to deploy your java webapplication to tomcat semi-automatically I suggest you to use the tomcat-maven plugin (section 3):
Tutorial on tomcat-maven plugin

Related

How to make my spring boot application online on my domain?

I have recently learned how to work with Spring boot. Now, I have an application which works locally without any problem. Now, I would like to know how I can make it available as a website.
I have got a free web host from here and have followed the instructions to create a war file for my project. But I don't know what I should do with this war file and how I should use it to have my web page online.
In the meantime, my code is using Atlas Mongodb in it. Is using a database problematic? Should I consider something special for that?
Thanks in advance,
Shared hosting like 000webhost do not support Spring boot Hosting. As it was said earlier to host spring boot you have two choices either you host jar or war file. War is the traditional way of hosting it which needs Apache tomcat server and Jar is the Modern way which supports cloud based solutions. To host your solution you can create an account with AWS(Amazon web services) or GCP (Google Cloud Platform) and you will get free credits to use for a while or you can use Heroku(https://devcenter.heroku.com/articles/deploying-spring-boot-apps-to-heroku) which is pretty much easier to use, its free also. For the database if you are using (https://www.mongodb.com/cloud/atlas) then you are good. All the best
If you are using Spring Boot, which have an embedded tomcat. You can just pack your project to a jar file, put the jar file to the server, and then simply execute it on the network interface that can connect to the outside world.
If you would like to pack your project as a war file, then you should first install the environment (application server) like tomcat, glassfish, jboss, etc. After that, you can deploy the war file on the application server.
Likewise, you should install the database server on your host, and edit the spring application.properties to let your spring application connect to the database.

Netbeans 8.2. Maven webapplication won't run on Tomcat but will on Glasfish server

I am developing a simple restful server and want to deploy it on a Tomcat server. When I deploy the project it won't run and gives me the message: http 404, The requested resource is not available.
The project is a default, newly created Maven project and when I select Glasfish it runs fine. Can anyone give help me to find out what I am doing wrong?
I found the problem myself. For anyone struggling. Java Jax-RS doesn't run default on Tomcat. You need Tomcat EE or add EE to Tomcat.

I can't see my WAR file in webapps folder of Tomcat

I can't see my WAR file in webapps folder of my Tomcat server directory.
My project is portal project and I am using Liferay portal technology hosted on Tomcat server.
For deploying, I am using Maven configured goal name 'deploy'.
When I deploy the portlet module it generated the war file and I can see the file in deploy folder of my Liferay server but when I start the tomcat server it should ideally generate/move WAR file in 'webapps' folder of tomcat server directory but it is not doing that.
I have tried multiple options like deleting and re-configuring the server, setting Dynamic web-module version to 3.0 from 2.5 (as suggested in one of the post at StackOverflow) but nothing works for me.
I am stuck in this issue for long time and any help will be a great help..
Thanks
I'm assuming that you're using Liferay 7 or Liferay DXP. As these versions are built on OSGi, they're transforming the WAR files into an OSGi bundle (so called WAB, Web Application Bundle) and do not deploy them to tomcat, as you observe.
Prior versions did this, but not the current one.
As you don't state what else you'd expect: This is your answer - you're right, it's not there.
If you don't use Liferay 7 or DXP: Elaborate.

Running a Spring MVC program in Intellij

I am a past Eclipse user and been using Intellij for 2 months on. However I am only been using it for Spring-Boot apps. I decided to make a fun Spring MVC app and I cannot figure out how to get it to deploy and run on my tomcat server. For spring boot it is pretty simple.
I was hoping someone could help me out with this.
The above picture show my options. I am using Intellij 14 full version if that matters.
Hope to hear from someone soon.
We can use Tomcat7 Plugin for running our App on IntelliJ
Follow this steps :
Click on Add Configuration
Click on +
You need to create a configuration for your Tomcat Server first.
If you don't see TomcatServer option when you try to create a configuration, you might need to enable Tomcat and TomEE Integration Plugin first by going to File -> Settings -> Plugins.
After you create a configuration for your server, you should be able to see options to run your spring application in the server.
You may also modify/configure how to run your app in the Deployment tab in your Tomcat configuration.
You need to package it using some tool or IDE.
And then to deploy
result package to your tomcat server with Idea plugin or any deploy
tool you like.
Also you can configure maven to do both targets easily.
Update: you can choose your Tomcat/TomcatEE goal in menu like at your screenshot and provide required server info here like host, port, etc.. And on the deployments page add your application artifact. And then save this build profile and use it with run>>run in main menu of IDE
No need to install tomcat server locally. You can use Tomcat7 Plugin in your pom and run it without any other configuration.

How to deploy fuse project in server?

I create one fuse project using Jboss developer studio with apache camel spring context..
Currently I am running my project in local machine in internal Jboss-eap of Jboss developer studio. Now i want to deploy my project in application server or container.
Please give me answer of below question :
1) What should i use : fabric8 or osgi?
2) What are the dependency need to add in pom.xml for deployment?
3) I have jboss-fuse-6.1.0.redhat-379 , as per my understanding it is container. For deploy my project in server should i required any application server like jboss-eap?
4) As i am using maven for dependency, should i need to copy my maven local repository to server?
I suggest to read the JBoss Fuse 6.1 documentation - there is a deploying into the container guide
https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.1/html/Deploying_into_the_Container/
As you have JBoss Fuse then its a container by itself, so you do not need JBoss EAP - its two different containers.
You can deploy from the Eclipse editor if you have the Fuse plugins installed (I think they are named integration stack). You can read how to install those plugins at the installation section from this page: http://tools.jboss.org/blog/

Resources