On 11/5/06, jiangshachina <[EMAIL PROTECTED]> wrote:
> You might want to make sure that your servlet container will actually load > the JAR files if you do this. The spec only requires that JAR files > directly in WEB-INF/lib be loaded, not from subdirectories. You are right. But I would put the jars at directory WEB-INF directory, and set web.xmlto fit for the matter.
That won't work either ... the servlet spec mandates that any JAR files you want included on your web application's classpath *must* be directly under WEB-INF/lib.
Just out of curiosity, why do you want to do this? Doing this seems > likely > make loading your classes a little bit slower. I just make the jars more clearly. Others can easily understand which lay/part of application some jar files are belong to. May I think too much?
Perhaps so ... to me, there are many things about application development that are *much* more important than the precise layout of the deployed application :-). I agree with you that understanding the structure of the application is important. But it is more important to understand how the *source* classes reference each other (for example, this is where UML class diagrams can be helpful) than how they are arranged inside an executable program. Imagine that you were using C or C++ and building a .exe native executable file for Windows, instead of a Java based web application. Would you really care much about how the linker combined all of the object files and libraries together? Probably not :-). Would you care about what libraries you used, and what their APIs are, and what modules depend on what other modules? Probably so :-). a cup of Java, cheers!
Sha Jiang
Craig
Craig McClanahan-3 wrote: > > On 11/5/06, jiangshachina <[EMAIL PROTECTED]> wrote: >> >> >> Generally, in Web application project, the Java class files would be put >> into >> WEB-INF/classes folder. > > > Just out of curiosity, why do you want to do this? Doing this seems > likely > make loading your classes a little bit slower. > > Now, I want the classes to be archived and putted into WEB-INF/lib folder. >> And the classes should be classified and putted into different >> sub-directories under WEB-INF/lib respectively. >> For example, WEB-INF/lib/data/(some jars related to Database operations), >> WEB-INF/lib/user/(some jars related to user management), etc. > > > You might want to make sure that your servlet container will actually load > the JAR files if you do this. The spec only requires that JAR files > directly in WEB-INF/lib be loaded, not from subdirectories. > > a cup of Java, cheers! >> Sha Jiang > > > Craig > > -- View this message in context: http://www.nabble.com/no-classes%2C-but-lib--tf2577029s177.html#a7193406 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
