Francesco Mangiacrapa 11 years ago
parent f5b92be19f
commit f7a81f4707

@ -214,41 +214,7 @@
</execution>
</executions>
</plugin>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<!-- TODO: Update version to 2.5.0 once gwt-maven-plugin 2.5.0 final
is released (post-GWT 2.5.0) -->
<version>2.4.0</version>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
</dependency>
</dependencies>
<!-- JS is only needed in the package phase, this speeds up testing -->
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
documentation at codehaus.org -->
<configuration>
</configuration>
</plugin>
<!-- GWT Maven Plugin - not needed -->
</plugins>
</build>

@ -206,20 +206,20 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
public void onCreateSharedFolder(CreateSharedFolderEvent createSharedFolderEvent) {
rpcWorkspaceService.readFromApplicationProfile("aaa", "bbb", new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(Void result) {
// TODO Auto-generated method stub
}
});
// rpcWorkspaceService.readFromApplicationProfile("aaa", "bbb", new AsyncCallback<Void>() {
//
// @Override
// public void onFailure(Throwable caught) {
// // TODO Auto-generated method stub
//
// }
//
// @Override
// public void onSuccess(Void result) {
// // TODO Auto-generated method stub
//
// }
// });
final FileModel sourceFileModel = createSharedFolderEvent.getFileSourceModel();

@ -1,7 +1,9 @@
package org.gcube.portlets.user.workspace.server;
import java.io.FileOutputStream;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@ -11,7 +13,6 @@ import java.util.concurrent.TimeUnit;
import javax.servlet.ServletContext;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.applicationsupportlayer.social.SocialPortalBridge;
import org.gcube.common.core.scope.GCUBEScope;
import org.gcube.common.core.utils.logging.GCUBEClientLog;
import org.gcube.portlets.user.homelibrary.home.exceptions.HomeNotFoundException;
@ -46,6 +47,7 @@ import org.gcube.portlets.user.workspace.client.workspace.GWTWorkspaceItem;
import org.gcube.portlets.user.workspace.server.notifications.NotificationsProducer;
import org.gcube.portlets.user.workspace.server.util.AllScope;
import org.gcube.portlets.user.workspace.server.util.Util;
import org.gcube.portlets.user.workspace.shared.FieldVerifier;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
@ -761,17 +763,11 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
Properties prop = new Properties();
try {
ServletContext servletContext = getServletContext();
System.out.println("context-path: "+servletContext.getRealPath(""));
System.out.println("context-path th: "+this.getThreadLocalRequest().getContextPath());
System.out.println("context-path cp: "+this.getServletContext().getContextPath());
InputStream in = (InputStream) FieldVerifier.class.getResourceAsStream("portletClassName.properties");
// load a properties file from class path, inside static method
prop.load(servletContext.getResourceAsStream("portletClassName.properties"));
prop.load(in);
// get the property value and print it out
System.out.println(prop.getProperty("idreport"));

@ -0,0 +1,29 @@
package org.gcube.portlets.user.workspace;
import java.io.IOException;
import java.util.Properties;
import org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl;
public class TestProperties {
public static void main(String[] args) {
Properties prop = new Properties();
try {
// load a properties file from class path, inside static method
prop.load(GWTWorkspaceServiceImpl.class.getClassLoader().getResourceAsStream("portletClassName.properties"));
// get the property value and print it out
System.out.println(prop.getProperty("idreport"));
System.out.println(prop.getProperty("idtemplate"));
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
Loading…
Cancel
Save