mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-24 16:01:52 +08:00
fix: weblogic upload jsp failed
This commit is contained in:
@@ -36,6 +36,10 @@ public class UploadServlet extends HttpServlet {
|
|||||||
if (!item.isFormField()) {
|
if (!item.isFormField()) {
|
||||||
String fileName = new File(item.getName()).getName();
|
String fileName = new File(item.getName()).getName();
|
||||||
String uploadFolder = getServletContext().getRealPath(UPLOAD_DIRECTORY);
|
String uploadFolder = getServletContext().getRealPath(UPLOAD_DIRECTORY);
|
||||||
|
if (uploadFolder == null) {
|
||||||
|
// weblogic
|
||||||
|
uploadFolder = ((File) getServletContext().getAttribute("javax.servlet.context.tempdir")).getParent() + File.separator + "war";
|
||||||
|
}
|
||||||
if (!uploadFolder.endsWith(File.separator)) {
|
if (!uploadFolder.endsWith(File.separator)) {
|
||||||
uploadFolder += File.separator;
|
uploadFolder += File.separator;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user