I am trying to access a very simple
servlet called "ServletOklogin" from an html page.
But unable to do this.
I think it could be two problems
(1) Path incorrect in the html page
(2) Need an web.xml page
The ServletOklogin.class is located at this path:
D:\tomcat\jakarta-tomcat-3.3.1\webapps\test\WEB-INF\classes
I have the testServlet.html under the
test folder, so thus the path is:
D:\tomcat\jakarta-tomcat-3.3.1\webapps\test
Here is the html file:
[code]
<html>
<head>
<title>testServlet.html</title>
</head>
<body>
<p>Press the submit button:</p>
<form method="get" action="http://localhost:8080/test/servlet/ServletOKlogin">
<p>
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
<p> </p>
</body>
</html>
What should the path be for the "action" variable in the form??
I have tried other variations like:
"test/WEB-INF/classes/ServletOKlogin"
etc.
but get the error:
HTTP 404 page cannot be found???
I think the problem is I need to produce an web.xml file???
And this would be placed in the WEB-INF folder located at:
D:\tomcat\jakarta-tomcat-3.3.1\webapps\test\WEB-INF\ ???
But I do not know what should be in this file?
The book I am using does not give an example of the web.xml file I should produce???
Please help???