wood burning stoves 2.0*
The moose likes Servlets and the fly likes Servlet Deployment / 404 resource() not available error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Deployment / 404 resource() not available error" Watch "Servlet Deployment / 404 resource() not available error" New topic
Author

Servlet Deployment / 404 resource() not available error

Robyn Morin
Greenhorn

Joined: Mar 21, 2010
Posts: 3
Hi all,
I am relatively new to servlets, but I am trying to test a simple servlet with Ubuntu Karmic Koala 9.10 and Tomcat 6 and while I am able to seemingly get Tomcat working to the point where I can see the Tomcat page and run the Servlet and JSP examples when I visit http://localhost:8080, I cannot seem to get my own servlet to work when I add the new folder to the Tomcat folder webapps. In this folder I have created my new servlet folder which includes a folder WEB-INF which contains web.xml and the folder classes which contains MyServlet.class.

Based on the example I am working from this is all I should need to get my basic servlet up and running but when I try to visit the url corresponding to my servlet I get the http 404 error "resource() not available"

Is there some sort of Tomcat configuration that I need to do to be able to use my own servlets?

Thanks

Robyn
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

Is the servlet in a package other than the default? If not, fix that.

Did you declare and map the servlet in the deployment descriptor? Are you using the correct URL to address this mapping?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Robyn Morin
Greenhorn

Joined: Mar 21, 2010
Posts: 3
I discovered the problem is because of the following

<?xml version="1.0" encoding="ISO-8851-1"?> = bad
<?xml version="1.0" encoding="UTF-8"?> = good

anyhow someone in another thread provided me the answer.

Sorry for posting a duplicate thread.

Robyn
 
 
subject: Servlet Deployment / 404 resource() not available error
 
Similar Threads
TomCat installation question
Servlet configuration
Not able to creat new Applications in Tomcat
Question reg Tomat5.0/Apache
Web Application Folder