File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Temporary Working Directories. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Temporary Working Directories." Watch "Temporary Working Directories." New topic

Temporary Working Directories.

Krishna, Alle

Joined: Nov 16, 2001
Posts: 14
Hi All,
I was reading the Servlet 2.3 spec for the SCWCD. The spec says that Servlet Containers must provide a private temporary directory per servlet context and make it available via a javax.servlet.context.tempdir
context attribute. Is this package somewhere present in individual or respective implementations of Servlet/Web Containers? This definitely is not part of the Servlet Extension API.
Can someone clarify this for me?
Thanks in advance.
Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
When creating reusable code such as tag libraries or Servlet specifications, it is a good habit to prefix attribute names with your code's package name so as to prevent clashes with other libraries.
This is why the attribute name starts with "javax.servlet". Had they simply named it "context.tempdir" or "tempdir", it is quite likely that someone, somewhere, would use or have used an attribute with the very same name and the results could be unpleasant.
But do keep in mind that this is an attribute name and not a Java package. It does not mean there is a javax.servlet.context package somewhere.
- Peter
I agree. Here's the link:
subject: Temporary Working Directories.
It's not a secret anymore!