Howdy, >Do my webapp name, servlet name, and directory name have to be the same >name, is this the issue here?
No, they don't have to be the same. You have your servlet class, e.g. com.yourcompany.yourservlet, in the WEB-INF/classes/com/yourcompany directory of your webapp. In your web.xml, you have <servlet> <servlet-name>MyServletName</servlet-name> <servlet-class>com.yourcompany.yourservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>MyServletName</servlet-name> <url-pattern>/MyServlet</url-pattern> </servlet-mapping> The contents of the <servlet-name> element in the <servlet> and <servlet-mapping> elements must match. The name of your webapp doesn't matter and doesn't go in web.xml, as everything in web.xml as relative to the webapp's base directory. Te above servlet is then accessible at http://yourserver:yourport/yourwebapp/MyServlet Yoav Shapira I have tried your suggestion with no >luck, the only reason I had the extended path was because I had seen >some examples on the web like that. My only other thought was that I >had bad permissions set on these files which I have checked and don't >see an issue with, I am practically pulling my hair out over here. This >morning I went so far as to create a brand new webapp with new web.xml >and new dirs and still no luck. > >[EMAIL PROTECTED] wrote: > >>Try this >> >> <servlet-mapping> >> <servlet-name>Login</servlet-name> >> <url-pattern>/Login</url-pattern> >> </servlet-mapping> >> >>Sincerely >>Erlis Vidal Santos >> >> >> >>>-----Original Message----- >>>From: Duane Kehoe [mailto:[EMAIL PROTECTED] >>>Sent: Thursday, October 09, 2003 5:03 PM >>>To: Tomcat Users List >>>Subject: Re: Web-app setup >>> >>>Sorry about that the whole web.xml is included. This is a very simple >>>app(actually my second app ever, the first was a simple lookup(which >>>worked)) so the web.xml that I have created thus far is very small >>> >>><?xml version="1.0" encoding="ISO-8859-1"?> >>><!DOCTYPE web-app PUBLIC "-//SUN Microsystems, Inc.//DTD Web >>> >>> >>Application >> >> >>>2.3//EN" >>> "http://java.sun.com/dtd/web-app_2_3.dtd"> >>><web-app> >>> <display-name>Login</display-name> >>> <description>my little login app</description> >>> <servlet> >>> <servlet-name>Login</servlet-name> >>> <servlet-class>com.mycompany.myapp.Login</servlet-class> >>> </servlet> >>> <servlet-mapping> >>> <servlet-name>Login</servlet-name> >>> <url-pattern>/myapp/com/mycompany/myapp</url-pattern> >>> </servlet-mapping> >>></web-app> >>> >>>Thanks again >>> >>>Lee, Paul NYC wrote: >>> >>> >>> >>>>Can you include the relevant part of web.xml? >>>> >>>> >>>> >>>> >>>> >>>-- >>> >>>/*Weyco** Group* -/ >>> >>>*/Florsheim, Brass Boot, Nunn Bush, Stacy Adams/* >>>Duane Kehoe >>>EC / Programmer / Analyst >>> >>> >>>Phone # 414.908.1814 >>>Fax # 414.908.1601 >>>Email: [EMAIL PROTECTED] >>> >> >> >> >> >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
