Skip to content

Commit

Permalink
Add redirection for the standard temp dir attribute when not explicit…
Browse files Browse the repository at this point in the history
…ly set (Issue #439)
  • Loading branch information
jesse-gallagher committed Apr 19, 2024
1 parent 720e999 commit 41f1970
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ public void declareRoles(String... arg0) {

@Override
public Object getAttribute(String arg0) {
// Handle a common case of requesting the spec-defined temp directory
if(ServletContext.TEMPDIR.equals(arg0)) {
Object explicit = delegate.getAttribute(arg0);
if(explicit == null) {
return delegate.getAttribute("javax.servlet.context.tempdir"); //$NON-NLS-1$
}
}
return delegate.getAttribute(arg0);
}

Expand Down

0 comments on commit 41f1970

Please sign in to comment.