Unable to access application after deploying on Tomcat using maven - java

I have recently started using Maven build tool for learning purpose.
I've previously made a small web application which was working fine on deploying directly on Tomcat 7.0.67 using Eclipse Indigo.
After I converted my web project into a Maven project and deploying it in the Tomcat server, I am unable to access it. When I check my Manager App tab, I can see my .war is deployed successfully.
Tomcat Manager App
LearningJSPv01..this is the maven project context.
edit: I just observed that while trying to add other web project resource to server, I am not getting the Maven project name

Related

Running a Servlet in a Maven Project using Tomcat

So I have installed Tomcat and that is working just fine. Currently I’m using Maven in Eclipse for a project. I want to run a servlet on tomcat with a maven project, how do I do that? It’s not as easy as just putting the files in the tomcat/webapps folder.

Unable to load web application deployed to standalone GlassFish, when deployed via Eclipse plugin

After importing a sample struts project into Eclipse(version 2019-12 (4.14.0)), and installing the GlassFish Tools plugin, I have been able to do the following:
・build the maven project (created a maven build configuration, with maven goal 'clean install')
→ the output war file gets generated in the target folder
・Add the instance of glassfish situated independently on my local machine to Eclipse
・deploy the project to the server (right clicking project root in project explorer, and doing 'run on server', selecting previously added glassfish server)
However, when I try to load a url of the application in a browser, I just get a 404 error message.
I have checked that the application is infact deployed, by referring to the GlassFish Console (http://localhost:4848/) I have double checked the url in use, with the context root field for the application on http://localhost:8080/
If I deploy the same war file manually, using the 'asadmin' command line utility, I can successfully load the expected page by specifying the same url.
When using both methods (commamd line, and Eclipse 'run on server') to deploy, the war file is the same.
Any ideas as to why I'm able to deploy in Eclipse, but just get 404 messages?
※Using both methods, the application context root is the same, as checked via the GlassFish Console.

Running spring tomcat app on heroku

I have a spring app that i am running on local tomcat using maven/intellij. I wanted to deploy it on heorko. When i just pushed the app (without any main class or procfile) i got the error that there is no application running.
I then followed this tutorial https://devcenter.heroku.com/articles/create-a-java-web-application-using-embedded-tomcat
and added changes to pom.xml, created a Main.java class as suggested and created a procfile on root (where the pom.xml file is) and then i pushed it to heroku. I got the same error that application isn't running.
How can i run a spring tomcat app on heroku.
p.s:
Spring configurations are done using <project_name>Configuration.java class and <project_name>Initializer.java.
Try following the guide for Deploying Spring Boot Applications to Heroku. If you're deploying a WAR file, try following the guide for Deploying WAR Files. Otherwise, you'll need to provide more info about your app.

Hosting Grails Application

I have a grails application which is running in http://localhost:8080/appname. I want to Deploy it on www.abc.anything.us. I build a war with production grails.serverURL=www.abc.anything.us. Copied the war to /var/lib/tomcat7/webapps/, but the url not work. Need a document of about publishing grails app to own host.

How to deploy Java EE application using Jenkins CI?

I have Jenkins CI configured with a SVN repo of our Java EE based application.
I am able to build the application but I am facing problems while deploying the war. Actually I don't have any idea how to get a war file out of the build and deploy it to a remote Tomcat 7 server.
I need to deploy this code to Tomcat 7 in the form of a war deployment. Please guide me through any tutorial or docs.
If your build is Maven based, you could use the Maven Tomcat plugin. This will do more or less the same actions as the Jenkins Deploy plugin, but it will add a dependency on your build tool and not on your continuous integration tool.
There's a plugin for that: https://wiki.jenkins-ci.org/display/JENKINS/Deploy+Plugin
Basically, the deploy plugin will use tomcat's built in REST API/manager application to deploy the war file.
I use this in anger, and it's pretty simple. The plugin does everything you'll need for a simple situation.
If your needs are more complicated than this, you can script access to the management REST API directly, but I advise you to start with the plugin.

Categories