File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Enterprise application setup on WSAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Enterprise application setup on WSAD" Watch "Enterprise application setup on WSAD" New topic

Enterprise application setup on WSAD

Kev D'Arcy
Ranch Hand

Joined: Jul 26, 2001
Posts: 75
I'm trying to port an application from VAJ 3.5 to WSAD and am wondering what the best way to set it up is. It consists of a web front end (servlets) which I've set up as a web module, support jars (such as jdom, xerces etc) which I've added as utility jars to the enterprise application. The other parts are communication components that are plain old java classes and I'm not sure what to do with these! If I set them up as utility jars for the application I can't debug through them (at least I think this is true!) and makes their development awkward. I've been told not to set them up as client components, so the only alternatives I see are either lumping everything into the web module (I'd rather not do this as there's quite a lot of code in the comms part) or setting them up as web modules. Anyone got any ideas on the best way forward??
Matthew Comer
Ranch Hand

Joined: Aug 10, 2001
Posts: 37
1) Set them up as a Java project. Then use the "make zip" plugin to have the compiled classes moved into a jar file in the EAR whenever the project is rebuilt. (You can put a Java project on the build path of your web project, but this does not address the need for the classes to be on the runtime classpath for the server. Making a jar and adding it to the EAR does this.) (ALSO - you'll need to reference the jar from the manifest file of your WAR - the "add module dependencies" wizard does this for you.)
2) Jar them and put them in the lib folder of your WAR. You can associate a "source jar" with the jar in WSAD so that you can debug. (Don't remember the exact steps - would need to look it up.)
Which is better? Depends. If the classes will be used by other projects, including any new web projects or an ejb project, use #1. If the classes are simply support files for the single web project, use #2.
p.s. If I hadn't just passed 157 I probably wouldn't be remembering any of this (grin).
[ May 21, 2002: Message edited by: Matthew Comer ]
I agree. Here's the link:
subject: Enterprise application setup on WSAD
It's not a secret anymore!