i have written a simple application to test working of my tomcat 3.2 which is installed on linux server ...
 
1. i have created a folder myapp in webapps/ROOT ( i.e. webapps/ROOT/myapp )
2. i have writen a simple html with 2 form fields in the myapp folder  ( test.html )
3. on submit, the values have to be passed to a servlet which is TestTomcat.class kept in WEB-INF/classes/tp, where tp is the package in which my servlet resides
4. the servlet is supposed to pass the values further to a jsp ( test.jsp ) which resides alongside the html and the jsp prints the form field values
 
the problem i am facing is that the tomcat is not recognising the tp package and hence is not able to locate the TestTomcat class residing in the tp package and eventually throws up 404 error on hitting the submit button of test.html form.
 
Interestingly, if i compile and place the TestTomcat without any package hierarchy directly in WEB-INF/classes, it works perfectly and the tomcat locates the class perfectly and the test.jsp prints out the values correctly.
 
So why does the tomcat server not recognise packages ? where am i going wrong ?
 
any solutions?
 
thanx,
ajit
 
p.s. i am enclosing my test.html code below
 
<html>
 
<head></head>
 
<body>
 
<form action="servlet/tp/TestTomcat">
 
<input type=text name=fname>
<br>
<input type=text name=lname>
 
<input type=submit>
</form>
 
</body>
 
</html>

Reply via email to