HttpStatus 404: The resorce is not available in Tomcat8 - eclipse

I am new to maven and trying to create a simple Login application using Spring and AngularJS. My project's name is ProMgmtPortal.
R-click on the project->Run As -> Maven Install :
the project gets successfully built.
R-click on the project -> Run As -> Run on Server :
It gives the error-
HttpStatus 404- The requested resource is not available.
I am using apache tomcat 8.0.36 server with Eclipse Neon.
Also, each time I run a project on server, some other projects of my workspace also get deployed by the server.
After tomcat is unable to deploy my target project- ProMgmtPortal, it starts deploying another project- TemplatePMP.

Related

Deploy error in WebLogic 10.3.6

I have tried to make the dynamic web project according to Struts 2 tutorial today.
I have successfully build and then exported WAR file.
When I try to deploy my exported WAR in Eclipse in WebLogic server, after uploaded the WAR file and click next, it shows below:
unable to access the selected application.
error exception in appmerge flows' progression
.....
WebLogic server 10.3.4
Struts2-2.5.10.1
JSP
JDK 1.6
Eclipse Mars

Eclipse dynamic web project not running on tomcat server

I've installed a Tomcat server to my Eclipse (Kepler), so why does it need an internet connection when I run a dynamic web project?
If I understood your question correctly - you need to start your tomcat server before you access your application. It's not related to internet connection.
Overall Steps:
1.Follow THIS post answer steps to setup tomcat into eclipse
2.Add your application artifact (.war or .jar file) into tomcat server by right click on server -> Add and Remove...
3.Select your artifact and click on add button. You will see artifact moved from Available to Configured box.
4.Clean entire project (Project -> Clean)
5.Start you server and check console for any error.
6.If you don't see any error - access your application
Hope this helps!!

Tomcat integration in Eclipse with maven

I'm trying to integrate Maven to my web project. I want t run project with mvn tomcat7:run, but when I do it maven creates new tomcat configuration in MyProject/target/tomcat and when I'm trying to open it on localhost and there is 404 error. Can anybody describe me what I should do to configurate maven to use local preconfigured tomcat instance?
Maven creates a Tomcat configuration locally with mvn tomcat7:run because you are running the webapp out of the /target directory and the aim is to keep the running webapp isolated from any external configuration. For example if you required custom Tomcat configuration applying then Maven would need to modify the Tomcat conf beforehand. This might not be possible due to file system permission or could affect other webapps. So Maven copies the config locally, applies any custom configuration and starts Tomcat via the tomcat7-maven-plugin.
One option is to look at the maven-cargo-plugin which can deploy a .war built with Maven into an existing running Tomcat installation. With the correct configuration, instead or using mvn tomcat7:run you would use mvn cargo:redeploy to remove a running webapp and replace it with your freshly built webapp.
As an alternative Eclipse can be configured to start a Tomcat instance in which to run the webapp in. If you change the Eclipse project type to a Dynamic Web Project and then add a Tomcat instance to Eclipse by doing:
Window → Preferences → Server → Runtime Environments
Add → Apache Tomcat v7.0
and point it do the Tomcat you downloaded. Eclipse will use this external Tomcat as a template to create an internal Tomcat configuration for your webapp. Lastly, the webapp needs to be configured to deploy the correct resources and libraries into Tomcat. By right clicking on the project root → Properties → Deployment Assembly, alter the list to match your resource locations. A standard set-up might look something like
/src/main/java | /WEB-INF/classes
/src/main/resources | /WEB-INF/classes
/src/main/webapp | /
Maven Dependencies | /WEB-INF/lib

Convert Dynamic Web Project to Maven = deployment empty

I have a Dynamic Web Project, that is deployed to a Tomcat server by Run As > on Server. The Project has WebServices WSDL, which work fine this way.
But I want to convert to maven/pom. So I use eclipse and choose "convert project to maven".
Afterwards, when I again choose > Run on Server, the tomcat deploy dir is empty!
What is changing exactly when converting to maven project, and how can I fix the deployment process again?
My advice would be to use the Maven Tomcat plugin:
http://tomcat.apache.org/maven-plugin.html
This way, you can create a Maven Run Configuration in Eclipse that compiles and deploys your app to Tomcat with one button click. There is also a Jetty server plugin.

Ejb with NetBeans

I am very new in Ejb and with very few knowledge about it. I have download NetBeans (7.01) and GlassFish and run a sample program. But, as I have no idea about Ejb, I can't understand how to run this program on NetBeans. Can anybody help me by giving steps how to run this program. Thanks in advance.
NetBeans installs on default GlassFish web application server, which deploys your enterprise projects. To ensure that server is registered in the IDE, go to Services -> Servers inlay and look for "GlassFish Server 3.x". If you found it, open projects properties inlay: right click on your enterprise project -> Properties -> Run and make sure, that "Server" is set to "GlassFish Server 3.x". Then you can deploy you enterprise application: right click on project -> Deploy. IDE should start application server and deploy your application. To run your deployed project right click -> Run or type in the browser address, given in your tutorial, which is mapped to your resource (e.g. http://localhost:8080/book). In this way GlassFish doesn't require additional settings files except persistence.xml in your ejb project and web.xml in the web project.
In case you don't have GlassFish server installed, you can download it here. Make sure you don't have it already installed separately from NetBeans.
If you want to deploy your app on JBoss application server (instead of GlassFish), you should first download it from official site and install. After you've done it, you can set it as server in NetBeans: Services -> Servers -> Add server. Then you can deploy your project as was described above.