deploy of servlet problem

J

james

I am newbie to servlet and I am trying some simple example of servlet in
which I have written
1) a html form to get data saved in webapps/myplace/
2) a servlet which is to return the data got from the request.get of the
html form.
I have deployed the tomcat server, put the compiled servlet class in the
WEB-INF/classes and also make the web.xml file.
However, when I load the page to the servlet from the html form, and click
submit from the form which is supposed to link to the servlet, it returns
404 error which said it cannot load the page.
I would like to know what I have missed that lead to such problem.
Thousands Thanks
 
S

Stefan Åkerberg

james said:
I am newbie to servlet and I am trying some simple example of servlet in
which I have written
1) a html form to get data saved in webapps/myplace/
2) a servlet which is to return the data got from the request.get of the
html form.
I have deployed the tomcat server, put the compiled servlet class in the
WEB-INF/classes and also make the web.xml file.
However, when I load the page to the servlet from the html form, and click
submit from the form which is supposed to link to the servlet, it returns
404 error which said it cannot load the page.
I would like to know what I have missed that lead to such problem.
Thousands Thanks

Probably something is wrong in your web.xml. Post a copy of it and I will
see if I can help.

/Stefan
 
W

William Brogden

james said:
I am newbie to servlet and I am trying some simple example of servlet in
which I have written
1) a html form to get data saved in webapps/myplace/
2) a servlet which is to return the data got from the request.get of the
html form.
I have deployed the tomcat server, put the compiled servlet class in the
WEB-INF/classes and also make the web.xml file.
However, when I load the page to the servlet from the html form, and click
submit from the form which is supposed to link to the servlet, it returns
404 error which said it cannot load the page.
I would like to know what I have missed that lead to such problem.
Thousands Thanks

If the URL you are using has /servlet/ in it, this is the invoker problem.
Look at the default web.xml file in TOMCAT\conf - search for invoker.
Bill
 
H

hiwa

james said:
I am newbie to servlet and I am trying some simple example of servlet in
which I have written
1) a html form to get data saved in webapps/myplace/
2) a servlet which is to return the data got from the request.get of the
html form.
I have deployed the tomcat server, put the compiled servlet class in the
WEB-INF/classes and also make the web.xml file.
However, when I load the page to the servlet from the html form, and click
submit from the form which is supposed to link to the servlet, it returns
404 error which said it cannot load the page.
I would like to know what I have missed that lead to such problem.
Thousands Thanks

We may need to know:
(1)The location you've stored the html and the servlet class, relative
to the Tomcat install dir.
(2)The value of FORM ACTION attribute and URL for the servlet.
(3)Your web.xml.
(4)TOMCAT/conf/web.xml
....Some of the recent versions of Tomcat has disabled invoker servlet
in its conf/web.xml by default ... That might be the cause of your
problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top