Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336220 - tmp directory is not set if you reload a webapp with jetty-maven-plugin
Summary: tmp directory is not set if you reload a webapp with jetty-maven-plugin
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.2.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 7.2.x   Edit
Assignee: Jan Bartel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-03 07:31 EST by Peter Schmidt CLA
Modified: 2011-05-25 22:14 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Schmidt CLA 2011-02-03 07:31:07 EST
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
Comment 1 Jan Bartel CLA 2011-05-25 22:14:32 EDT
Fixed for jetty-7 head. svn rev 3270.