tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Honza Spurný <spu...@master.cz>
Subject Re: Setting classpath out of the webapp directory
Date Mon, 03 May 2004 12:32:02 GMT
I've done:

- in the common directory I've created "src" directory
- into the src dir I've copied all shared java-sourced classes
- i've compiled them into the common/classes directory
- i've copied some shared libaries into the common/lib
- i've removed whole directory webapps/MyApp/WEB-INF/classes/ (classes
direcotry is still presented, but it is almost empty -- except the
messageResources files -- these were leaved in the original space)
- i've restarted tomcat

Now no error occures. But after I want to connect to the webapp, that has
some classes in the common/classes directory, the blank page in the browser
occures and on the tomcat-terminal is written: java.lang.ClassCastException.
This means, as I know, that tomcat can find this classes in the
common/classes directory. :(

Does anybody know, what I should set in the tomcat variables to let tomcat
could search the common/classes directory for classes?

Thanks a lot for help
Honza S.

Eric Noel wrote:
> On 5/3/2004 4:26 PM, Honza Spurný wrote:
>
>> Hi there,
>>
>> I'have been trying to set the classpath of the webapp out of the
>> directory of this webapp. This is for me little important, since
>> some classes I'd like to use (I have to use) in other webapps. I
>> want to have only one file of this class -- I don't want to copy
>> classes between the webapps.
>>
>> I'm sure it is possible to do it, as I need it, but I don't know
>> how. Would be anybody so kind and help me with this?
>>
>> I would also like to "export" the lib directory of webapp out of the
>> webapp directory so that the shared libaries could be presented as
>> file only once. This is probably the same problem as above.
>>
>> Could anybody help me? Thanks a lot.
>>
>> Best Regards.
>> Honza Spurny
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
> $CATALINA_HOME/common/lib - jars
> $CATALINA_HOME/common/classes - classes
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message