Home > Back-end >  Why is to upload pictures to the target directory of images rather than a webapp directory
Why is to upload pictures to the target directory of images rather than a webapp directory

Time:09-30

String dirPath=request. GetServletContext (.) getRealPath ("/images ");

CodePudding user response:

Because the compiled class file is in the target directory and program is to run the class files, not running. Java file

CodePudding user response:

But I say this is not entirely accurate, should be put first. Java file compiled into a class file, and then program to run these class files

CodePudding user response:

The target directory is your deployment directory, your program is running under the directory, so you get to this directory
  • Related