PDA

View Full Version : Build as Web Library Project in WSAD?


joeparks
Nov 22nd, 2004, 07:33 PM
I'm trying to debug an issue with Spring and WAS 4.0 http://forum.springframework.org/showthread.php?t=10080

I have imported the latest version of spring from cvs as a java project into WSAD 5.1.2. I am unable to reference the ContextLoaderServlet, though, from a web project after defining the spring java project as a Web Library Project.

Does this clearly describe what I'm trying/failing to do? Has anyone else gotten this configuration to work?

-joe

klr8
Nov 23rd, 2004, 01:14 AM
This is a bug in WSAD. The 'add servlet' popup you get in the web.xml editor doesn't detect servlets in web library projects. You will have to manually define the servlet in the source XML view.

Erwin

joeparks
Nov 23rd, 2004, 07:23 AM
I'm afraid that this is not true, at least not in version 5.1.2. I can create a simple Java project with a Servlet class defined, add the project to the build path and register the project as a web library project; the servlet is available through the "Add..." popup in the web.xml editor.

With the ContextLoaderServlet, not only does it not appear in the popup, but I get a NoClassDefFound error when starting the test environment. The spring project is simply not visible to the web project.

Perhaps it is because of the multiple source/output paths defined in the project? I'll go down that path later.

-joe