Author: Alex.Kolonitsky
Date: 2009-05-05 09:54:14 -0400 (Tue, 05 May 2009)
New Revision: 14020
Modified:
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/CopyImageStuff.java
Log:
fix deploying on JBoss 5.0
Modified:
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/CopyImageStuff.java
===================================================================
---
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/CopyImageStuff.java 2009-05-05
13:52:08 UTC (rev 14019)
+++
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/CopyImageStuff.java 2009-05-05
13:54:14 UTC (rev 14020)
@@ -3,7 +3,6 @@
*/
package org.richfaces.photoalbum.util;
-import static org.richfaces.photoalbum.service.Constants.IMAGE_FOLDER;
import static org.richfaces.photoalbum.service.Constants.PHOTOALBUM_FOLDER;
import static org.richfaces.photoalbum.service.Constants.TEMP_DIR;
import static org.richfaces.photoalbum.service.Constants.UPLOAD_FOLDER_PATH_ERROR;
@@ -70,8 +69,9 @@
final ServletContext servletContext = ServletLifecycle.getServletContext();
if (servletContext != null) {
- this.imageSrc = getClass().getClassLoader().getResource(IMAGE_FOLDER).getPath();
- }else {
+// this.imageSrc = getClass().getClassLoader().getResource(IMAGE_FOLDER).getPath();
+ this.imageSrc =
ServletLifecycle.getServletContext().getRealPath("WEB-INF/classes/Upload");
+ } else {
throw new IllegalStateException(UPLOAD_FOLDER_PATH_ERROR);
}
Show replies by date