-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Malladi,
On 8/24/2009 10:36 AM, Malladi, Sasikanth wrote: > I'm using "Core Servlets" by Marty Hall as a guide. Which edition? It may be out of date. > I've created a servlet, HelloServlet. Well, it just says "hello". Can you post the code? > I've compiled it and put the class file into > .../install_dir/webapps/ROOT/WEB-INF/classes/. > I've enabled the invoker servlet by uncommenting it in > .../install_dir/conf/web.xml. This is fine for testing purposes, but you really should not use the invoker servlet. Instead, it's easy to enable your servlet in your own webapp's web.xml: <servlet> <servlet-name>Hello</servlet-name> <servlet-class>HelloServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Hello</servlet-name> <url-pattern>/HelloServlet</url-pattern> </servlet-mapping> > I've enabled the servlet reloading in .../install_dir/conf/context.xml. You should probably not be modifying CATALINA_HOME/conf/context.xml. Instead, create a file in webapps/ROOT/META-INF/context.xml and put your configuration there. Remember not to set the "docBase" or "path" attributes in your <Context> element. > However, I can't see the servlet in http://myhost:8008/servlet/HelloServlet. > > What am I missing? I suspect you have a package/class name mismatch with your .class file and the URL you're using to access the servlet. Disable the invoker servlet, write a proper web.xml file, and post your code. That will help a lot. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqSt3gACgkQ9CaO5/Lv0PAKEACgqqCK2g+WQoJuEgtHpmwhzvUb S94AoLvUqwmqs7U7B0fFdbtmkeOVIbXK =x+CO -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org