|
What I mean is to write a servlet and place it under the classes of web-inf (note: there is no web.xml file under web-inf, this is for rapid development and testing of servlets)
I will modify the tomcat-install/confg/web.xml file according to the method in the book
Removed the comment below
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
<servlet-mapping>
Restart tomcat5.0
Then directly visit http://localhost/servlet/HelloWorld
But it reported an error, showing that the / directory cannot be accessed
Is it wrong to modify the web.xml file? Which master can help? Thank you |
|