mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
updating servletcontextformdatafunctionsadapter for change to how getRealPath gets processed as a jndipath. updating press release form for changes to alfresco namespace.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4775 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.alfresco.web.forms;
|
||||
|
||||
import org.alfresco.jndi.AVMFileDirContext;
|
||||
import org.alfresco.util.JNDIPath;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.SAXException;
|
||||
import javax.servlet.ServletContext;
|
||||
@@ -39,13 +40,22 @@ public class ServletContextFormDataFunctionsAdapter
|
||||
{
|
||||
// The real_path will look something like this:
|
||||
// /alfresco.avm/avm.alfresco.localhost/$-1$alfreco-guest-main:/www/avm_webapps/my_webapp
|
||||
System.err.println("looking up real path for " + path);
|
||||
path = this.servletContext.getRealPath(path);
|
||||
|
||||
// The avm_path to the root of the context will look something like this:
|
||||
// alfreco-guest-main:/www/avm_webapps/my_webapp
|
||||
path = path.substring(path.indexOf('$', path.indexOf('$') + 1) + 1);
|
||||
path = path.replace('\\','/');
|
||||
return path;
|
||||
System.err.println("got real path " + path);
|
||||
try
|
||||
{
|
||||
final JNDIPath jndiPath = new JNDIPath(AVMFileDirContext.getAVMFileDirAppBase(), path);
|
||||
// The avm_path to the root of the context will look something like this:
|
||||
// alfreco-guest-main:/www/avm_webapps/my_webapp
|
||||
|
||||
return jndiPath.getAvmPath();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.err.println(e.getMessage());
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
public Document parseXMLDocument(final String path)
|
||||
|
Reference in New Issue
Block a user