> From: Miguel Almeida [mailto:[email protected]]
> Subject: [Tomcat 7] Why can't you use automatic deployment
> and exploded WAR when docBase is outside appBase?
> The motivation for this is a simple code ServletContext.getRealPath("/")
> to create a simple temporary inputstream that works in Tomcat6 but doesn't
> in Tomcat7 (because getRealPath("/") will return null).
And, if you check the servlet spec, getRealPath() is *never* guaranteed to
work. Your code should be using either getResourceAsStream() or looking at the
javax.servlet.context.tempdir context attribute to find where it can create
temporary files.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]