my servlet file is in C:\tomcat4\webapps\examples\WEB-INF\classes\coreservlets\parameters.java and html file is in C:\tomcat4\webapps\forms\parametersform.html Then i tried to access this form as follows 127.0.0.1:8080/forms/parametersform.html it gives 404 error Html file has action as follows: <form action="/servlet/coreservlets.parameters"> plz help
shankar vembu
Ranch Hand
Joined: May 10, 2001
Posts: 309
posted
0
Originally posted by Dhanashree Mankar: my servlet file is in C:\tomcat4\webapps\examples\WEB-INF\classes\coreservlets\parameters.java
So your base dir is C:\tomcat4\webapps\examples\ And you need to have all your html files in here. Copy your forms folder to C:\tomcat4\webapps\examples\ and then try http://127.0.0.1:8080/forms/parametersform.html should work. regards.
Sim Raina
Ranch Hand
Joined: Nov 20, 2003
Posts: 33
posted
0
try this 127.0.0.1:8080/parametersform.html and when calling servlet 127.0.0.1:8080/servlet/servletname
if u can't impress people with ur intelligence , confuse them with ur bullshit
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
1
posted
0
my servlet file is in C:\tomcat4\webapps\examples\WEB-INF\classes\coreservlets\parameters.java and html file is in C:\tomcat4\webapps\forms\parametersform.html
1. parameters.java - you need to compile it to parameters.class 2. \forms\parameterform.html - If you do not have a forms\WEB-INF directory and a web.xml in that directory, Tomcat will NOT recognize forms as a valid web application and will not serve the html page. 3. use of /servlet/ in the action - IEEEEEE the invoker servlet problem strikes again. Read about it here in the excellent FAQ. Bill