I have created a web project in WSAD 4.0 and set it's build path with several needed jar files. When try to run a jsp using WTE server, I am getting an error "ClassNotFoundException". For example, my jsp is referencing Category class of Log4J.jar, the console gives me Category class not found exception. I have checked the jar for Category class and it exists in that jar. This jar is in build path of the project. I do not know why my project is not able to access jar(s) placed in project's build path. I would appreciate your help. Thanks
The build path allows you to build the application, but is not the runtime dependency. You need to right click the web app, select edit jar dependencies, then select the jar you want. I think you need to do this on the package view. (This may not be the exact instructions since I'm on WSAD 5 now and it has changed slightly) Dave
Following on David's mail.. If u are using WSAD 4, - Go to team perspective - Right click on the project - Select 'Edit Module Dependencies' - select the jar that you want to reference. That should sort it out
Best Regards,<br />Nagendra Prasad.
Joined: Jun 24, 2003
Thanks for your input. I ended up adding the jar file in WEB-INF/lib directory and every thing works fine now.