Hello

Is 'cd' located in the TOMCAT_HOME/webapps directory? I think it must be.

Assuming it is, then this is your context (web application folder) and this
is where the WEB-INF sub-directory should be located.

The cos.jar should then reside in cd/WEB-INF/lib.

You can 'bury' JSPs in sub-directories (eg cd/SMC) and still invoke them by
specifying the full path details, as you are doing at present.

BUT... the WEB-INF sub-directory *must* be located at the top level of the
context (web app) folder - and in this case 'cd' is your context (web app)
folder.

Locating the WEB-INF folder correctly means the 'lib' folder within it will
be in 'right' place for Tomcat's classloaders to find it.

BTW the same is true for Servlets, which reside in WEB-INF/classes.

Regards

Harry Mantheakis
London, UK


> Hey,
> 
> 'cd'is the name of a directory (yes, not the best name for a directory, but
> its got another meaning from 'change directory :-s) and SMC is a directory
> under that. (hence .../cd/SMC)
> 
> I can access another page in .../cd/SMC/foo.jsp that specifies the form and
> the target ('ACTION').
> 
> This action=insertProduct.jsp  , which is the code that tries to handle the
> uploading of files specified in the form on the previous page.
> 
> I do have a WEB-INF sub-directory in .../cd/SMC , and the lib directory in
> there
> does have the jar file that I need..
> 
> I still get this error...
> 
> any clues?
> 
> Thanks,
> Kaushal
> 
> p.s. 'the ...' notation I've used above it to signify a directory structure
> previous to the one described above.
> 
>> ===== Original Message From Harry Mantheakis
> <[EMAIL PROTECTED]> =====
>> Hello
>> 
>> What is 'cd'?
>> 
>> SMC *should* be your context, because the WEB-INF sub-directory is located
>> there - unless you've got things mixed up?
>> 
>> Harry Mantheakis
>> London
>> 
>> 
>>> Hello,
>>> 
>>> I'm new to JSP, so this is confusing me. I am trying to use the
>>> com.oreilly.servlet.multipart package to try and upload files for a test
> page.
>>> 
>>> However, I'm facing the following error:
>>> /tmp/foo/jakarta-tomcat-4.1.27/temp/cd/SMC/insertProduct_jsp.java:8:
> package
>>> com.oreilly.servlet does not exist
>>> import com.oreilly.servlet.*;
>>> ^
>>> /tmp/foo/jakarta-tomcat-4.1.27/temp/cd/SMC/insertProduct_jsp.java:9:
> package
>>> com.oreilly.servlet.multipart does not exist
>>> import com.oreilly.servlet.multipart.*;
>>> ^
>>> 2 errors
>>> 
>>> The packages are contained in a jar file called cos.jar , which I've put in
>>> ../cd/SMC/WEB-INF  (and /cd/SMC/WEB-INF/lib )
>>> (the file that uses this - insertProduct.jsp - is located in ..../cd/SMC )
>>> 
>>> Can anyone throw any pointers as to why this is happeneing? I set my
> classpath
>>> to point to the jar file, but it doesnt help (frankly, I don't see why it
>>> would, since the webserver is running of a totally different daemon, and
> I'm
>>> not even the owner of that :(  -- but I'm just trying to get this to
> compile!)
>>> 
>>> Thanks,
>>> Kaushal
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to