aspose file tools*
The moose likes Servlets and the fly likes The requested resource (/SecondServlet/) is not available? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "The requested resource (/SecondServlet/) is not available?" Watch "The requested resource (/SecondServlet/) is not available?" New topic
Author

The requested resource (/SecondServlet/) is not available?

Sapumal Bandara
Ranch Hand

Joined: Oct 29, 2013
Posts: 31

Guys please help me with this. I am new to servlets. I created a simple java servlet ("SecondServlet ") using Eclipse IDE and JBoss AS. When I ran it on the AS it says: "The requested resource (/SecondServlet/) is not available".. Any help is much appriciated.

Thank you.


Be you.. not someone else.. in everything you do..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

See the ServletsFaq for a checklist of things to check.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sapumal Bandara
Ranch Hand

Joined: Oct 29, 2013
Posts: 31

Bear Bibeault, Thanks for the direction .

Regards,
Sapumal
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 998
    
  13

Be sure to check for package declarations on your servlet classes. If you still can't find the problem, post your web.xml file here.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
Sapumal Bandara
Ranch Hand

Joined: Oct 29, 2013
Posts: 31

Kevin, below is my web.xml file. Can you explain a bit what you mean by "Check package declaration.."? Thanks.


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Have you looked through the list? I can already see that your servlet is not in a non-default package.
Sapumal Bandara
Ranch Hand

Joined: Oct 29, 2013
Posts: 31

Thanks Bear Bibeault, Previously I didn't get what you said. I created a new package and put my servlet in it. The thing is that I have to create the servlet by right clicking on the WebContent folder.. Finally all together it worked. Thank you all.

Regards,
Sapumal.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The requested resource (/SecondServlet/) is not available?