Tomcat Plugin Doesn't work properly
Tomcat Integration plugin doesn't properly resolve the endorsed lib folder.
It also provides lacking classpath.
I changed the getEndorsedDirs:
private static String getEndorsedDirs( String catalinaHomeDir , String
tomcatIntegration )
{
if ( tomcatIntegration.equals( "4.0.x" ) )
{
return catalinaHomeDir + File.separator + "common" +
File.separator + "endorsed";
}
else
{
return catalinaHomeDir + File.separator + "common" +
File.separator + "endorsed";
}
}
And also added this in the buildClassPath method:
File f = new File( catalinaHomeDir + File.separator + "server" +
File.separator + "lib" );
File[] files = f.listFiles();
File file = null;
for ( int i = 0 ; i < files.length ; i++ )
{
file = files[ i ];
if ( file.getName().endsWith( ".jar" ) )
{
parameters.addPath( file.toString() );
}
}
f = new File( catalinaHomeDir + File.separator + "common" +
File.separator + "lib" );
files = f.listFiles();
file = null;
for ( int i = 0 ; i < files.length ; i++ )
{
file = files[ i ];
if ( file.getName().endsWith( ".jar" ) )
{
parameters.addPath( file.toString() );
}
}
请先登录再写评论。