Hola, >I also hadn't realised that the servlet spec does not require support for >the "unpacked" mode that I have been using, and that only packed war files >need to be supported. Where does the spec say this - I've looked at it >again just now, but can't find it.
It says it implicitly by only discussing packed WAR files as the only deployment method. The reason the Spec doesn't mandate containers to support running unpacked WARs is that the authors don't want to restrict servlet containers such that implementations require filesystems. This might seem abstract and/or pointless, but there have been servlet containers (including one bundled with a version of Oracle iAS, so not just marginal/experimental ones) that run completely inside a DB for example, so the notion of a filesystem is non-existant. A lot of the things that seem weird, abstract, or annoying with the Servlet Spec go back to this need for supporting a no-filesystem scenario. >From previous readings of the servlet spec, I thought that whether packed >into a warfile or deployed in an "open" directory tree, the webapp would >work the same A well-designed webapp would work the same. One that's not well-designed wouldn't: for example if you use getRealPath, you'll get different results depending on whether you're packed or not. >Also, the servlet spec doc does not seem to refer to "context.xml" files at >all, which seems odd given that they seem to be designed to increase >portability. Are they spec'd/recommended somewhere else than in the jsr154 >docs, or are they in fact a TC feature? They're a TC-only feature. Other containers go about it different ways. This has been covered a zillion times on this list before -- the archives have more (or rather, a repeat of these) details ;) Context.xml files are NOT designed to increase portability at all. They're a convenience feature. In fact, they're a sinkhole for beginners to REDUCE their portability in favor of short-term convenience. That's why I don't like them. That's why I don't like DefaultContext and GlobalNamingResources either. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
