I have a web.xml file under the WEB-INF directory:
<?xml version="1.0" encoding="ISO-8859-1"?>
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
description The requested resource (/review/HelloServlet) is not available.
I don't know why, if I have my web.xml file with the descriptions needed to the servlet. May I did a mistake with the pathname? or there is something else missing?
Thank you very much.
Joined: Oct 08, 2006
At quick glance I see two mistakes:
1) Classes ought to be placed in packages. There are circumstances wherein packageless servlets work, but you should never make your application dependent on that. That's a bad practice.
2) url-pattern is relative to the context root. So with this configuration your servlet is effectively to be accessed as http://localhost:8080/review/review
I'd to say, go through a decent JSP/Servlet tutorial or book. This all is namely fairly trivial.