From users-return-147943-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Wed Jul 12 14:44:22 2006 Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 46019 invoked from network); 12 Jul 2006 14:44:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Jul 2006 14:44:22 -0000 Received: (qmail 32417 invoked by uid 500); 12 Jul 2006 14:44:06 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 32390 invoked by uid 500); 12 Jul 2006 14:44:06 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 32379 invoked by uid 99); 12 Jul 2006 14:44:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2006 07:44:06 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.127.94.25] (HELO ncrusout2.NCR.COM) (192.127.94.25) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2006 07:44:05 -0700 Received: from susday234.corp.ncr.com (localhost [127.0.0.1]) by ncrusout2.NCR.COM (8.12.10/8.12.10) with ESMTP id k6CEhhZU017474 for ; Wed, 12 Jul 2006 10:43:44 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Accessing a servlet Date: Wed, 12 Jul 2006 10:43:42 -0400 Message-ID: <351F89D30B94074CA4EF76696E564113071D8380@susday234.corp.ncr.com> In-Reply-To: <351F89D30B94074CA4EF76696E564113071D8018@susday234.corp.ncr.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Accessing a servlet Thread-Index: AcaluZJEjuBAnDtyQd28NHsMB2BAbgAAGjGAAAG/yOA= From: "McRaven, Brian" To: "Tomcat Users List" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N If the url-pattern should be /firstpack/JustALittleTest then should the form on the JSP refer to action=3D"firstpack.JustALittleTest" or action=3D"firstpack/JustALittleTest" ?=20 Brian=20 -----Original Message----- From: McRaven, Brian=20 Sent: Wednesday, July 12, 2006 9:55 AM To: Tomcat Users List; p@pidster.com Subject: RE: Accessing a servlet When I use this entry I get a request resource not found error. JustALittleTest firstpack.JustALittleTest JustALittleTest /firstpack/JustALittleTest Under the previous error to this one I was using an entry of: JustALittleTest JustALittleTest JustALittleTest /firstpack.JustALittleTest With the following entry: JustALittleTest firstpack.JustALittleTest JustALittleTest /firstpack.JustALittleTest I get an error of 'Error allocating a servlet instance' Brian -----Original Message----- From: Pid [mailto:p@pidster.com] Sent: Wednesday, July 12, 2006 9:46 AM To: Tomcat Users List Subject: Re: Accessing a servlet TheServletName package.ThisIsTheClassName TheServletName /a/path/to/theservlet "servlet-name" is used to link the definition to the mapping. defs are grouped together in web.xml, as are mappings. "url-pattern" refers to the path by which you'll access the servlet. it can any unique url on your system, and does not have to reflect the class name. McRaven, Brian wrote: > I made the servlet part of a package but I'm getting a Servlet not=20 > Found Exception. The actions I took to make the servlet part of a=20 > package are the following: >=20 > 1 added package line to java code, recompiled > 2 placed new class file in new subdirectory of WEB-INF/classes folder=20 > with same name of package > 3 changed entry in web.xml file to reflect package that servlet is in=20 > for the url-pattern > 4 changed JSP so that the forms action=3D"firstpack.JustALittleTest" >=20 > I've looked at the log files but I'm not sure what to look for. >=20 > Brian >=20 > -----Original Message----- > From: Jon Wingfield [mailto:jon.wingfield@mkodo.com] > Sent: Wednesday, July 12, 2006 7:49 AM > To: Tomcat Users List > Subject: Re: Accessing a servlet >=20 > I would check in tomcat logs directory for reasons why the servlet is=20 > not available. One reason could be that classes should be in a package: >=20 > http://tomcat.apache.org/faq/classnotfound.html >=20 > HTH, >=20 > Jon >=20 > McRaven, Brian wrote: >> OK I did that and now my system is hanging which I guess could be an=20 >> error in my code or something with the server. I think it is my code >> so I'll look that over. Thanks for your help. Sorry for the > confusion. >> Brian >> >> -----Original Message----- >> From: David Smith [mailto:dns4@cornell.edu] >> Sent: Tuesday, July 11, 2006 2:48 PM >> To: Tomcat Users List >> Subject: Re: Accessing a servlet >> >> Did you reload the webapp after making the change? All changes to=20 >> WEB-INF/web.xml or files in WEB-INF/classes and WEB-INF/lib will=20 >> require a reload before they become active in tomcat. >> >> --David >> >> McRaven, Brian wrote: >> >>> I was able to refer to a book I have and so I dropped the .class=20 >>> extensions altogether. I get an error that requested resource is=20 >>> not >=20 >>> available still. Any suggestions on this? My web.xml file has this >>> entry: >>> >>> >>> JustALittleTest >>> JustAlittleTest >>> >>> >>> >>> JustALittleTest >>> /JustALittleTest >>> >>> >>> And my action attribute=3D"JustALittleTest". >>> >>> Brian >>> >>> >>> -----Original Message----- >>> From: McRaven, Brian >>> Sent: Tuesday, July 11, 2006 1:14 PM >>> To: users@tomcat.apache.org >>> Subject: Accessing a servlet >>> >>> Well I'm ticking these newbie questions off. I have a simple=20 >>> servlet >=20 >>> that I want my form to access. I compiled the file fine and it is=20 >>> called JustALittleTest.class. I placed this file in the=20 >>> ROOT/WEB-INF/classes folder. In my JSP I have a form with some=20 >>> submit buttons. The action element of the form is set to > =3D"JustALittleTest". >>> I changed my web.xml file so it now has the following entries: >>> >>> >>> JustALittleTest >>> JustAlittleTest.class >>> >>> >>> >>> JustALittleTest >>> /JustALittleTest.class >>> >>> >>> I've tried a few changes to the above entries but I haven't gotten=20 >>> it >=20 >>> right yet. Should the servlet-class value have a .class extension? >>> Is >>> my url pattern accessing the correct folder? >>> >>> Brian >>> >=20 >=20 >=20 > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, > e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org >=20 >=20 > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, > e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org >=20 >=20 >=20 --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org