Problem:
I am relatively new to tomcat, i deployed a war file from the new project i am working on and it deploys fine without any problems, but when i try to run the app it gives 404.
I tried :
tried to find the appropriate error messages but,no errors seen in eclipse console nor in logs folder in tomcat installation directory. How do i troubleshoot this problem? any help is appreciated.
1. Please check this file: ( sometimes the console won't give any tips)
${tomcat-root-directory}/logs/localhost.yyyy-MM-dd.log
2. My case:
I depolyed war file successfully logging from the console's output.
But when I access the url in browser, I get 404 error.
I checked the log, found that java source files are missing. and there was a java.io.FileNotFoundException.
Then I remembered that I use the maven clean command, before packaging the war file. It deleted them! Without those resource files, my war project doesn't start up properly. and I checked http://127.0.0.1:8080/manager/html tomcat webapps management page, my war project running status is false.
Related
Hi I already develop my application using Netbeans IDE.
Now I want to run my application in Tomcat server for actual use. I already copy my project to tomcat/webapps.
But when I tried to run my application:
http://localhost:8081/myAppFolder/
it gives me an error message :The requested resource (/Opportunities-Registration/) is not available.
I should change the url to make it work:
http://localhost:8081/Opportunities-Registration/web/index.jsp
How can I open my application using http://localhost:8081/myAppFolder/ insteand of http://localhost:8081/Opportunities-Registration/web/index.jsp ?
Update:
All my servlet is also become 404 not found
Thank you
SOLVED
Solution:
1. copy .war file which is contained in dist folder of your netbeans project
2. Place your .war file to tomcat/webapps
3. Start your tomcat
4. You are good to go
I'm trying to deploy my java app as a web service using Tomcat Apache. I put the .war file under the /webapps directory, run Apache, and when I try to access the url I get a 404 error.
I've created my app on Eclipse, and if I try to deploy it from Eclipse using a Tomcat server, it works, I can correctly access all my servlets.
What might I be missing / doing wrong?
Thank you,
You either have the wrong URL when you run outside Eclipse or the WAR file that you deploy is incorrect.
You should look at the Tomcat logs and console to see what messages it gives to explain what you did wrong.
Eclipse is just an IDE. Your code won't have access to it in production. Put aside that it works there and figure out what you did wrong with the package.
Hello I'm facing strange problem while trying to run the Dynamic web project on eclipse. I have attached the screenshot of the error message.
If I open localhost:8080/, I can see Apache Tomcat home page. But when I use localhost:8080/projectName, it gives 404 error, resource not found. I believe it is because of the error I'm getting while trying to run the project.
You can try manually deployment of your web project.
Create a war file of the dynamic web project and put that war file under webapps folder of your tomcat installation directory.
Then restart the server and test in browser by entering localhost:8080/your_projectName
If it runs then there is problem in eclipse.You can reconfigure server in your eclipse.
I'm using NetBeans 7.2 and GlassFish 3.1.2 and I'm running a web application with JSPs and Servlets. There seems to be some errors in the output because I'm getting a blank webpage when the app is run. I understand that the log file is located in glassfish/domains/logs folder, but I'm not able to see any System.out or System.err inside of that text file.
Is there anything I have to configure so that I can read the log and come to know as to where I'm going wrong? Ideally I'm trying to debug the servlet.
In NetBeans, go to Tools->Servers. Select the GlassFish Server and on the 'common' tab the 'Domains folder' + the 'Domain Name' is the root folder you need to browse to on your machine. Inside of that folder, you'll see a 'logs' folder which will contain the 'server.log' file.
I'm trying to deploy a very basic GWT app to tomcat and running into problems. I took the sample GWT project in eclipse, tested it to make sure it ran, then right clicked and selected google > gwt compile. I then took the war file, zipped it up and renamed it gwtproject.war. I then went into tomcat and slected deploy from the menu, and deployed the project. Yet every time I navigate to localhost:808/GwtProject I get a 404 error.
From what I've gathered reading several posts this looks like its an .xml configuration issue. I have not changed the default xml file nor its location, but do I have to modify it and move it up to the root folder? If so, what exactly do I have to modify in it? This is my first time working with tomcat, and while I read the documentation I'm still at a loss, thanks for the help!
The problem is with this step:
I then took the war file, zipped it up and renamed it gwtproject.war
Do not make the war file zip and rename to war, because that is a war file in a non war file :)
war file has manifest, zip not.
Just take the original war file ( without zipping) and deploy that one.