package org.splat.simer;
import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
import org.splat.kernel.Do;
import org.splat.service.technical.RepositoryService;
return _uploadFileName;
}
+ /**
+ * Get fileName with url special symbols canceled for usage in struts.xml.
+ * @return
+ */
+ public String getCanceledFileName() {
+ String res = _uploadFileName;
+ try {
+ res = URLEncoder.encode(res, "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ LOG.error("Reason: ", e);
+ }
+ return res;
+ }
+
/**
* Get the action to which the uploaded file is passed.
*
step-study
</result>
<result name="import" type="redirectAction">
- import-document?fileName=%{fileName}
+ import-document?fileName=%{canceledFileName}
</result>
<result name="version" type="redirectAction">
- version-document?index=%{index}&fileName=%{fileName}
+ version-document?index=%{index}&fileName=%{canceledFileName}
</result>
<result name="attach" type="redirectAction">
- attach-document?index=%{index}&fileName=%{fileName}
+ attach-document?index=%{index}&fileName=%{canceledFileName}
</result>
<result name="outofmemory" type="tiles">
page.error.study