| Summary: | tmp directory is not set if you reload a webapp with jetty-maven-plugin | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Peter Schmidt <gevatter.tod> |
| Component: | server | Assignee: | Jan Bartel <janb> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jetty-inbox |
| Version: | 7.2.2 | ||
| Target Milestone: | 7.2.x | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
Fixed for jetty-7 head. svn rev 3270. |
when you run jetty with the jetty-maven-plugin and reload a webapp, ServletContext.getAttribute("javax.servlet.context.tempdir") will return null because of this line in AbstractJettyMojo.configureWebApplication the tmp directory is only set once: if ( webAppConfig.getTempDirectory() == null && tmpDirectory != null) { ... webAppConfig.setTempDirectory(tmpDirectory); but WebAppContext.setTempDirectory sets the attribute "javax.servlet.context.tempdir" summary: -you stop the webapp -all attributes are cleared -WebAppContext.setTempDirectory is not called anymore so "javax.servlet.context.tempdir" will not be set