MWS has some file locators to resolve the real file location for paths:
For example:
//get the real file location
String realFileLocation = com.webmethods.rtl.util.FileUtil.getRealLocation("webroot:/foldername/filename.xml");
//or get an input stream for the file content
InputStream fileInputStream = com.webmethods.rtl.util.FileUtil.getInputStream("webroot:/foldername/filename.xml");
The webroot:/ prefix resolves from MWS/server/default/deploy/portal.war/
…and there are other resolvers for other roots:
The dist:/ prefix resolves from MWS/
The root:/ prefix resolves from MWS/server/default/
The deploy:/ prefix resolves from MWS/server/default/deploy/
#MWS-CAF-Task-Engine#webMethods-BPMS#webMethods