Hi,
I have this appliation am making using servlets but whenever i deploy it in tomcat i can only access one class. Whenever i try to pass data to the other (as a form) i get an error message that the class cant be found. I dont know f its the web.xml configuration that is the problem coz i've tried changing it but still no results. Anyone know how i can solve this?
Comments
: I have this appliation am making using servlets but whenever i deploy it in tomcat i can only access one class. Whenever i try to pass data to the other (as a form) i get an error message that the class cant be found. I dont know f its the web.xml configuration that is the problem coz i've tried changing it but still no results. Anyone know how i can solve this?
:
Hi,
Can you please give the exact error it is throwing like 404 not found or similar error.
: : I have this appliation am making using servlets but whenever i deploy it in tomcat i can only access one class. Whenever i try to pass data to the other (as a form) i get an error message that the class cant be found. I dont know if its the web.xml configuration that is the problem coz i've tried changing it but still no results. Anyone know how i can solve this?
: :
: Hi,
: Can you please give the exact error it is throwing like 404 not found or similar error.
:
I've kind of dealt with the error but now when i try to load the page it gives me the download prompt (as in its downloading teh paeg instead of displaying it).
this is my xml configuration:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
First Servlet
A basic hellow world program
Hello
mypackage.Hello
Hello2
mypackage.Hello2
Hello
/hello
Hello2
/hello2
index.jsp
-----
It can display the Hello servlet but downloads the Hello2. The way it works is - i place a get request to from Hello to Hello2 but even if i load it directly as u would any other web page it still downloads the page.
: : : I have this appliation am making using servlets but whenever i deploy it in tomcat i can only access one class. Whenever i try to pass data to the other (as a form) i get an error message that the class cant be found. I dont know if its the web.xml configuration that is the problem coz i've tried changing it but still no results. Anyone know how i can solve this?
: : :
: : Hi,
: : Can you please give the exact error it is throwing like 404 not found or similar error.
: :
:
: I've kind of dealt with the error but now when i try to load the page it gives me the download prompt (as in its downloading teh paeg instead of displaying it).
:
: this is my xml configuration:
: <!DOCTYPE web-app
: PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
: "http://java.sun.com/dtd/web-app_2_3.dtd">
:
:
:
: First Servlet
:
: A basic hellow world program
:
:
:
: Hello
: mypackage.Hello
:
:
: Hello2
: mypackage.Hello2
:
:
: Hello
: /hello
:
:
: Hello2
: /hello2
:
:
: index.jsp
:
:
:
: -----
: It can display the Hello servlet but downloads the Hello2. The way it works is - i place a get request to from Hello to Hello2 but even if i load it directly as u would any other web page it still downloads the page.
:
:
Hi friend,
All you need to do is develop your servlet so that it contains all the classes you want to deploy in tomcat. compile it and then make a jar file of it. Add this jar file into org/apache/catalina package of tomcat. Make appropraite changes in web.xml so that it will load
this jar file. Restart tomcat and view the url you want.