yaa that is probably what is wrong.. actually sometimes you have to include the exact class or jar file name with fully qualified path in the classpath. just putting the directory does not work always.
however, if your servlet is going above 6K lines, that you can probably break the logic into many or atleast a few javaBeans. This not only will solve the problem but also will make the code more manageable. 6K lines is way too much for one block of code and thsat too in a servlet. -----Original Message----- From: viju [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 8:27 PM To: [EMAIL PROTECTED] Subject: Re: Newbie needs help with sub-classes outside my main servlet Set your classpath to current directory. Vj ----- Original Message ----- From: "Kenny G. Dubuisson, Jr." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday,March 06,2003 11:57 PM Subject: Re: Newbie needs help with sub-classes outside my main servlet > I hate to sound stupid but I'm having trouble with this. I created a public > class named InitPts in a file named InitPts.java and compiled it to > InitPts.class. All these files reside in WEB-INF/classes. In my main > servlet I want to call InitPts but I always get a compile error saying not > found. I've tried "import InitPts" but it complains about missing a period. > I've tried putting inside my servlet the line "InitPts();" but it says class > not found. Any ideas what I'm doing wrong...I know it's something simple > that I'm missing/not understanding. Thank you very much, > Kenny > > ----- Original Message ----- > From: "Minos Chadgidakis" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, March 06, 2003 9:50 AM > Subject: Re: Newbie needs help with sub-classes outside my main servlet > > > > You can put the new classes inside WEB-INF/classes.You won't even have > > to import them this way.However doing this continuesly,you will quickly > > have many classes without any organization,so it's really not suggested. > > You can put them in packages, and then put the packages inside > WEB-INF/lib, > > alternatively, you can even have folders inside WEB-INF/classes like: > > /project01/templates/UserBean.class > > /project01/helper/helper1.class > > /project01/helper/helper2.class > > /project01/servlets/servlet1.class > > > > Then you will have to use import in your servlet,for example to use > helper2 > > you first write > > import project01.helper.helper2; > > or import project01.helper.*; > > > > Anyway all the paths start from WEB-INF/classes or WEB-INF/lib. > > Start the easiest way.Put them in WEB-INF/classes without new folders... > > When this works, try to make folders.Then use the lib directory. > > > > > > > > > > > > > > > > > > On Thu, 6 Mar 2003 08:52:09 -0600, Kenny G. Dubuisson, Jr. > <[EMAIL PROTECTED]> wrote: > > > > >Hello all. I've run into a problem where a servlet has reached the max > size > > >allowed (8K lines). I need to break it up into some external classes. > The > > >question I have is where to put the external classes. I know my current > > >servlet goes in my app's "WEB-INF/classes" directory. But if I make a > class > > >that my servlet calls, where would I put it? Do I need to make the > external > > >classes part of a package? If so, where do I make my package's directory > > >structure? > > > > > >Any help would be very appreciated. I've checked in my java books but > don't > > >see a clear answer to what I'm wanting to do. > > >Thanks, > > >Kenny > > > > > > >___________________________________________________________________________ > > >To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body > > >of the message "signoff SERVLET-INTEREST". > > > > > >Archives: http://archives.java.sun.com/archives/servlet-interest.html > > >Resources: http://java.sun.com/products/servlet/external-resources.html > > >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > > > > > > > ___________________________________________________________________________ > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body > > of the message "signoff SERVLET-INTEREST". > > > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > > Resources: http://java.sun.com/products/servlet/external-resources.html > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html Disclaimer: This e-mail message along with any attachments is intended only for the addressee and may contain confidential and privileged information of GTL Limited. If the reader of this message is not the intended recipient, you are notified that any dissemination, distribution or copy of this communication is strictly prohibited. If you have received this message by error, please notify us immediately, return the original mail to the sender and delete the message from your system. ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
