This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes Http Server 404 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Http Server 404" Watch "Http Server 404" New topic

Http Server 404

Komal Amaresh
Ranch Hand

Joined: Oct 06, 2008
Posts: 67

I've been trying to run a simple servlet for 2 days but couldn't neither in the eclipse ide nor through the command prompt by creating a war file.
Its been a year since i have touched java, and now at this stage i feel despicable.
the servlet is getting compiled as i set the classpath on the command prompt making servlet-api.jar availabe. I'am creating the WEB-INF folder inside which i placed the web.xml and classes folder. Inside the classes folder i'am placing the class file. All these inside a folder named project1. finally creating the war file using the path
jar -cvf one.war project1
I'm placing the war file in the webapps folder of tomcat5.5 which im using.
Im able to start tomcat properly on the command prompt. my project is being displayed in the apps of the tomcat mager page. once i click it it displays
Http error 404
The requested resource is not available

I just am not able to resolve it.

please help me.

thanks and regards
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63349

It sounds as if you have not placed the servlet in a package. Do so.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Soumya Babu

Joined: Jun 29, 2012
Posts: 5
i am facing the same prob





When i click submit i am getting The requested resource () is not available.whT MIGHT BE the possible reasons?

Rob Spoor

Joined: Oct 27, 2005
Posts: 20132

Soumya Babu wrote: <servlet-class>org.poc/</servlet-class>

That's not a proper class name. Class names consist of the package name followed by a dot and the simple class name; .java is not part of it. In your case, the class name is org.poc.HelloWorld.

And can you please UseCodeTags next time?

How To Ask Questions How To Answer Questions
Soumya Babu

Joined: Jun 29, 2012
Posts: 5
done with code tags...
Soumya Babu

Joined: Jun 29, 2012
Posts: 5
changing classname also did not work
Sandy Chatterjee
Ranch Hand

Joined: Jun 27, 2012
Posts: 55

<package name="org.poc" extends="struts-default">

Change it to a singe package( From 'org.poc' to 'poc').
<package name="org.poc" extends="struts-default">

and from


Take up one idea. Make that one idea your life; dream of it; think of it; live on that idea. Let the brain, the body, muscles, nerves, every part of your body be full of that idea, and just leave every other idea alone. This is the way to success.
Soumya Babu

Joined: Jun 29, 2012
Posts: 5
Still it did not work..:'(

I have made slight differences in the code..
I agree. Here's the link:
subject: Http Server 404
It's not a secret anymore!