I wrote this as a personal response to someone who had problems with the class path as well on the mailing list. I hope it helps you as it helped him. Make sure to read all of it.
>>Begin email.<< Thank you for your help. In my haste trying to install Tomcat on our server while my boss breathes down my neck, I never fully understood the purpose of WEB-INF (until now). Thank you again! SETH At 08:12 AM 9/19/2002 +0800, you wrote: > Ok. I went through the examples. > First, make sure that you have asked it to use the correct java bean. > You can do this by including this statement : > <jsp:useBean id='clock' scope='page' class='dates.JspCalendar' > type="dates.JspCalendar" /> > You don't need to do a page import if you use the above. And that's > how a java bean should be used. > > > Ok, the structure of the examples webapp is like this right? > /examples > |----------/WEB-INF > | |-----/classes > | | |-----/dates > | | |----/JspCalendar.* > (This is the important one). > | |---- /jsp > | |---- /web.xml > |---------/servlets > |---------/jsp > |---------/images > > So if you wish to bring this to the another webapp, you need to make > sure that the dates directory and the contents of it are under > /[WhatEver]/WEB-INF/classes/. > The reason why JspCalendar.* is under the directory dates, is because > it is part of the package dates. > You can see this in the source of the java class.The reason why this > whole dates package has to go into classes is because they are not > jar'ed up. If they were jar'ed up it would go into > /[WhatEver]/WEB-INF/lib/*.jar, You don't have to do this, the seperate > classes work just fine. > > If you are still running into trouble, let me know, I'll repack a > webapp for you to use. Shouldn't be too hard to do. ok? > > Seth Brahler wrote: > >> Hi, >> >> Thank you for answering my question, but I'm still a bit confused. >> >> I copied the class file from webapps\examples\WEB-INF and placed it >> in the folder I want to use it. >> >> The simple page looks like this: >> >> <%@page import="JspCalendar"%> >> Day of month: is <jsp:getProperty name="clock" property="dayOfMonth"/> >> >> and it breaks. >> >> Thank you. >> Sincerely, >> SETH >> >> >> >> At 07:55 AM 9/18/2002 +0800, Kwok Peng Tuck wrote: >> >>> [EMAIL PROTECTED] >> >> >> >> You need to copy the class files to be able to use it. If it's a >> servlet then you should copy the definition in web.xml . Since it >> isn't just copy the class file from WEB-INF. >> >> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
