Sergio Arrighi wrote: > Hi! > Thanks for the really quick answer. > It's probabily something really basic to do, but I'm a newbie and I'm > not able to do it: > I have an application (lets call it APP1) and it's organized like this: > > APP1 > ----- WEB-INF > +++++++ lib > ............................. myJar.jar (contains the package > org.imin.treemenu) > -.-.-.-.-.-.-.-..-.-.-.-.-.-.-.- myServlet > (org.imin.treemenu.TreeMenuServlet) > ----- web.xml > > Now I need to register _myServlet_ in the deploy descriptor and I > write these lines in web.xml: > <servlet> > <description></description> > <display-name>TreeMenuServlet</display-name> > <servlet-name>TreeMenuServlet</servlet-name> > <servlet-class>org.imin.treemenu.TreeMenuServlet</servlet-class> > </servlet> > <servlet-mapping> > <servlet-name>TreeMenuServlet</servlet-name> > <url-pattern>/TreeMenuServlet</url-pattern> > </servlet-mapping> > > When I try my application and I click on the button which make an AJAX > post request on this servlet the browser returns an error (404 not found) > > Sorry to bother but I'm new! > Thanks > > Sergio > > Caldarale, Charles R ha scritto: >>> From: Sergio Arrighi [mailto:sergio.arri...@iminholding.com] >>> Subject: Servlet mapping issue >>> >>> Here's my question.... Is it possible to add a servlet mapping which >>> points directly to the servlet contained in the .jar file >>> of my tree menu? >>> >> >> Well... yes. Servlet mapping is explained in the servlet spec, and >> there are numerous examples that ship with Tomcat. >> >> Is there more to your question? Perhaps some constraints that you >> haven't mentioned? >> >> - Chuck >> >> >> > What URL is your AJAX posting to? Also take a look at your logs for any relevant messages. Maybe there was a problem setting up your servlet. The servlet mapping looks good as you defined it in your webapp's WEB-INF/web.xml file.
--David --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org