• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

HTTP Status 404. My project runs ok w/ eclipse +tomcat; fails when exporting to .war

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

My struts development on eclipse works just fine. I can view my application on the browser (localhost) and it works just as I'm expecting it to work. This holds on the development phase.

Now, I need to show my result to a client. I'm exporting the project into a war file (right click the project --> export --> war file) and I upload the war file on my tomcat (I mean I don't use eclipse, I use the tomcat application)


So I do this,
0. I have the .war file
1. I shutdown the server from eclipse (consider shutdown eclipse)
2. I place the war file under webapps
3. I startup tomact
4. I verify that tomcat is up and running (it is!)
5. I go to my project: http://localhost:8080/Troopers
6. I see that under webapps the war file was extracted to a folder (Troopers)

and this is what I get:

HTTP Status 404 - /Troopers/
--------------------------------------------------------------------------------

type Status report

message /Troopers/

description The requested resource (/Troopers/) is not available.



can anyone advise why?

* I'm using eclipse 3.3.1.1
* Tomcat v5.5

Thank you!
 
Ranch Hand
Posts: 341
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please go to Tomcat manager and check if the Running property for your project is True.

If it is false, then there was some error in deployment.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Anubhav,

could you explain what is the Tomcat manager? do you refer to the Tomcat with eclipse (the plugin)?

I did this:
on the project-->right click-->properties-->Tomcat

General- [x] Is a Tomcat Project

still...same issue.

thanks again!
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat Manager is the web console of the Tomcat web server. When you normally say http://localhost:8080 then you get the Tomcat Homepage.
Now there are a few links on the top left side and one of them is the "Tomcat Manager".
Tomcat Manager is the page where you can see the list of applications deployed on your server and other essential properties for them.

One of the properties is "Running". It is depicted as a column on the Tomcat manager page.
What I meant was if the running property for your application is false then there was some error in deployment and tocat is not able to start your application.

The error can be because of many reasons like.
- Error in war file
- Error in deployment descriptor
- Error in tomcat application loader
or, multiple other reasons.

So, on the first case I suggest that you check the running property and see if it is false ( which I think must be the case). Then, just clean your project-recompile and make a fresh war and try to deploy it.


And just one more thing, if your project was made with eclipse on some other machine and you copied your project to another machine and deployed it, that can also lead to some issues as the .project file for eclipse IDE stores some information for the native machine and this may lead to clashes when you try to deploy the code on Tomcat.

Hope that helps.
reply
    Bookmark Topic Watch Topic
  • New Topic