Author: keith Date: Tue Jun 24 00:45:02 2008 New Revision: 18592 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=18592
Log: Fix for Mashup-869 Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java?rev=18592&r1=18591&r2=18592&view=diff ============================================================================== --- trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java (original) +++ trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java Tue Jun 24 00:45:02 2008 @@ -433,29 +433,16 @@ try { UserRegistry systemRegistry = embeddedRegistry.getSystemRegistry(); - File serviceUiFile = - new File(systemRegistry.get(path) + if (systemRegistry.resourceExists(path)) { + Resource resource = systemRegistry.get(path); + File serviceUiFile = new File(resource + .getProperty(JavaScriptEngineConstants.RESOURCES_FOLDER) + + "/www/index.html"); + if (!serviceUiFile.exists()) { + serviceUiFile = new File(resource .getProperty(JavaScriptEngineConstants.RESOURCES_FOLDER) + - "/www/index.html"); - - if (serviceUiFile.exists()) { - - StringBuffer fileData = new StringBuffer(1000); - BufferedReader reader = new BufferedReader(new FileReader(serviceUiFile)); - char[] buf = new char[1024]; - int numRead; - while ((numRead = reader.read(buf)) != -1) { - fileData.append(buf, 0, numRead); + "/www/index.htm"); } - reader.close(); - - serviceUiSource = fileData.toString(); - } else { - serviceUiFile = - new File(systemRegistry.get(path) - .getProperty(JavaScriptEngineConstants.RESOURCES_FOLDER) + - "/www/index.htm"); - if (serviceUiFile.exists()) { StringBuffer fileData = new StringBuffer(1000); _______________________________________________ Mashup-dev mailing list [email protected] http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev
