Tomcat HTTP Status 404 after switch location in eclipse - java

I created a spring web application in eclipse, with Tomcat as runtime server.
It worked fine,and I could see my app working using:
http://localhost:8080/MyAppName/
But once I did switch location(from workspace metadata to tomcat location ) in the tomcat server properties of eclipse, application is giving HTTP Status 404 when I am trying to access it by :
http://localhost:8080/MyAppName/
I followed this tutorial to create a sample helloworld web application in eclipse:
http://javapapers.com/spring/spring-mvc-hello-world/
Can someone help me know why this is happening?
I am using tomcat 7 + eclipse luna

Related

Running status of application in Tomcat manager is true but got 404 not found?

I have deploy my application in IntelliJ by tomcat. The deploy process seem to be success when I got these logs:
[2020-12-17 01:36:54,245] Artifact CheckInService: Artifact is deployed successfully
[2020-12-17 01:36:54,245] Artifact CheckInService: Deploy took 152,785 milliseconds
But when I went to the link I got 404 error (I follow context link in my deployment). Therefore I have go to tomcat manager and saw that my CheckInService's running status is true.
What could be the problem here? Thanks!
What context url is reported for this application in Tomcat manager app? Check that you open the correct url. The web path root url is taken from the Run Configuration Application context value:

Eclipse - Could not publish server configuration for Tomcat8.0 server at localhost

I have created some example web service methods and trying to publish in my localhost with Tomcat v8.0. I use Eclipse Java EE IDE for Web Developers with Mars version 4.5.0.
I configured the server Tomcat v8.0. I got the configured server in Eclipe's Servers list. I Start the server. But Eclipse prompts saying
Publishing to tomcat v8.0 Server at localhost..." has encountered a problem.
And the error details shows that Multiple context have a path for /HelloWorldServlet and /com.vogeila.jersy.first. These are the servlet projects I created in my workspace.
You can refer this screen shot:
I followed this answer.
"Server Tomcat v7.0 Server at localhost failed to start" without stack trace while it works in terminal
But It didn't work for my case.
Share your ideas.
The prompted message helped me. The Server.xml file under Servers has multiple entries of <Context> tag. I deleted everything by leaving only one entry. It worked for me. 
Delete Existing tomcat server...
Then add new server.. its work for me

Netbeans 7.3 unable to register server Tomcat 7.0.41

Whenever I try to open a Java web application in netbeans IDE, it shows an error message : "No servers are registered in the IDE". But I have added it. I have used Apache Tomcat and GlassFish server too. Can anyone please help me?

Tomcat started in STS but unable to connect to http://localhost:8080/Portal

I configured Tomcat Server 6.0.24 in STS and started successfully
But when I am trying to connect to http://localhost:8080/ it is giving me the following error
HTTP Status 404 - /
type Status report
message /
description The requested resource is not available.
Apache Tomcat/7.0.57
Any Solution, unfortunately i'm a newbie...my Java developer isn't available for the next one more week and I've to do the HTML modification in the portal.
I need a solution to fix this.
I tried to switch server location but Tomcat never starts. I closed the STS and went into localhost:8080 then my tomcat page shows up.
But the problem is only when STS is open i get 404 error.

error embedding a war into a jetty

I tried this example of an embedding war into a jetty.
When I debug on eclipse everything its ok and the webservices is deployed fine in port 8080, but when I make a jar with this program and put into a server (I tried into a tomcat 5.5 and into a jetty 7.4.1) when I start the program, when I started the jetty server appears this exception:
7641 [qtp21021313-35] ERROR configuration.EngineConfigurationFactoryServlet - Unable to find config file. Creating new servlet engine config file: /WEB-INF/server-config.wsdd
7641 [qtp21021313-35] WARN configuration.EngineConfigurationFactoryServlet - Unable to load/create servlet engine config file, attempting internal default (from jar).
Only the default webservices methos are deployed (AdminService and Version)
The wsdd its fine. If I deploy this war into a server it works perfectly
You should run the java code without the servlet container (Tomcat/Jetty), you have the jetty server embedded, that's why in eclipse the code works fine.
Jetty's slogan:
"Don't deploy your application in Jetty, deploy Jetty in your application."
You should check this tutorial:
http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty
For more info:
http://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications

Categories