Re: new user: servlets dont run in new apps
yes ! thank you Sumit. the servlet-mapping element fixed it. i need to go back and read the docs more. George Shrotriya, Sumit wrote: Do you have a servlet-mapping in your web.xml Something like this might do for you(Change the MyClass value accordingly) ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2.2.dtd; web-app display-nameMyClass/display-name servlet servlet-nameMyClass/servlet-name servlet-classMyClass/servlet-class /servlet servlet-mapping servlet-nameMyClass/servlet-name url-pattern/servlet/MyClass/url-pattern /servlet-mapping /web-app ~Sumit -Original Message- From: George Metz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 4:35 PM To: [EMAIL PROTECTED] Subject: new user: servlets dont run in new apps what simple thing am i missing ? (probably something in the documentation, but i havent found it so far) PROBLEM: cannot get servlets to run in a NEW webapp. the ones that come with tomcat work ok, except for the sample servlet in the Developer's Guide. this built-in one doesnt run either: http://127.0.0.1:8080/tomcat-docs/appdev/sample/web/hello (gives: HTTP Status 404 The requested resource (/tomcat-docs/appdev/sample/web/hello) is not available As for my new apps: - a simple html page in webapps\george runs ok - a tomcat example jsp i modified and dropped into webapps/george/Jsp runs fine. called thusly: http://127.0.0.1:8080/george/Jsp/geo_hello.jsp?yakittyyak - i successfully copied/renamed/modified/compiled and ran a servlet under examples\WEB-INF\classes, even referenced it successfully in examples\WEB-INF\web.xml like so : servlet servlet-namegeorghe/servlet-name servlet-classGeorgeHello/servlet-class /servlet works like a champ when called thusly: http://127.0.0.1:8080/examples/servlet/GeorgeHello?username=CletusT or http://127.0.0.1:8080/examples/servlet/georghe?username=CletusT BUT same GeorgeHello class servlet placed under webapps\george\WEB-INF\classes wont run. gives the dreaded 404 HTTP Status 404 The requested resource (/george/servlet/GeorgeHello) is not available Have same problem with David Flanagan's (OReilly) javaexamples2 app (installed it from a .war file, tomcat extracted it). JSPs run fine, servlets dont. (george app directories were set up manually, but carefully. have checked permissions/properties on the directories several times. look the same as the examples app to me. ) thanks! George -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
new user: servlets dont run in new apps
what simple thing am i missing ? (probably something in the documentation, but i havent found it so far) PROBLEM: cannot get servlets to run in a NEW webapp. the ones that come with tomcat work ok, except for the sample servlet in the Developer's Guide. this built-in one doesnt run either: http://127.0.0.1:8080/tomcat-docs/appdev/sample/web/hello (gives: HTTP Status 404 The requested resource (/tomcat-docs/appdev/sample/web/hello) is not available As for my new apps: - a simple html page in webapps\george runs ok - a tomcat example jsp i modified and dropped into webapps/george/Jsp runs fine. called thusly: http://127.0.0.1:8080/george/Jsp/geo_hello.jsp?yakittyyak - i successfully copied/renamed/modified/compiled and ran a servlet under examples\WEB-INF\classes, even referenced it successfully in examples\WEB-INF\web.xml like so : servlet servlet-namegeorghe/servlet-name servlet-classGeorgeHello/servlet-class /servlet works like a champ when called thusly: http://127.0.0.1:8080/examples/servlet/GeorgeHello?username=CletusT or http://127.0.0.1:8080/examples/servlet/georghe?username=CletusT BUT same GeorgeHello class servlet placed under webapps\george\WEB-INF\classes wont run. gives the dreaded 404 HTTP Status 404 The requested resource (/george/servlet/GeorgeHello) is not available Have same problem with David Flanagan's (OReilly) javaexamples2 app (installed it from a .war file, tomcat extracted it). JSPs run fine, servlets dont. (george app directories were set up manually, but carefully. have checked permissions/properties on the directories several times. look the same as the examples app to me. ) thanks! George
RE: new user: servlets dont run in new apps
Do you have a servlet-mapping in your web.xml Something like this might do for you(Change the MyClass value accordingly) ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2.2.dtd; web-app display-nameMyClass/display-name servlet servlet-nameMyClass/servlet-name servlet-classMyClass/servlet-class /servlet servlet-mapping servlet-nameMyClass/servlet-name url-pattern/servlet/MyClass/url-pattern /servlet-mapping /web-app ~Sumit -Original Message- From: George Metz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 4:35 PM To: [EMAIL PROTECTED] Subject: new user: servlets dont run in new apps what simple thing am i missing ? (probably something in the documentation, but i havent found it so far) PROBLEM: cannot get servlets to run in a NEW webapp. the ones that come with tomcat work ok, except for the sample servlet in the Developer's Guide. this built-in one doesnt run either: http://127.0.0.1:8080/tomcat-docs/appdev/sample/web/hello (gives: HTTP Status 404 The requested resource (/tomcat-docs/appdev/sample/web/hello) is not available As for my new apps: - a simple html page in webapps\george runs ok - a tomcat example jsp i modified and dropped into webapps/george/Jsp runs fine. called thusly: http://127.0.0.1:8080/george/Jsp/geo_hello.jsp?yakittyyak - i successfully copied/renamed/modified/compiled and ran a servlet under examples\WEB-INF\classes, even referenced it successfully in examples\WEB-INF\web.xml like so : servlet servlet-namegeorghe/servlet-name servlet-classGeorgeHello/servlet-class /servlet works like a champ when called thusly: http://127.0.0.1:8080/examples/servlet/GeorgeHello?username=CletusT or http://127.0.0.1:8080/examples/servlet/georghe?username=CletusT BUT same GeorgeHello class servlet placed under webapps\george\WEB-INF\classes wont run. gives the dreaded 404 HTTP Status 404 The requested resource (/george/servlet/GeorgeHello) is not available Have same problem with David Flanagan's (OReilly) javaexamples2 app (installed it from a .war file, tomcat extracted it). JSPs run fine, servlets dont. (george app directories were set up manually, but carefully. have checked permissions/properties on the directories several times. look the same as the examples app to me. ) thanks! George -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]