Added codes for running from Eclipse
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@142812 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
679d26000e
commit
b445d6e202
|
@ -16,17 +16,17 @@ import javax.portlet.RenderResponse;
|
|||
* Aug 6, 2015
|
||||
*/
|
||||
public class WorkspaceUploaderPortlet extends GenericPortlet{
|
||||
|
||||
|
||||
/**
|
||||
* JSP folder name
|
||||
*/
|
||||
public static final String JSP_FOLDER = "/WEB-INF/jsp/";
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static final String VIEW_JSP = JSP_FOLDER + "WorkspaceUploader_view.jsp";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -38,9 +38,11 @@ public class WorkspaceUploaderPortlet extends GenericPortlet{
|
|||
* @throws IOException .
|
||||
*/
|
||||
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
|
||||
|
||||
|
||||
// request.setAttribute("fromportlet","true");
|
||||
|
||||
//PortalContext.setUserInSession(request); ///???????
|
||||
|
||||
// Invoke the JSP to render
|
||||
PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(VIEW_JSP);
|
||||
rd.include(request,response);
|
||||
|
|
|
@ -79,9 +79,14 @@ public class WsUtil {
|
|||
if(user==null || user.getUsername().isEmpty())
|
||||
throw new Exception("Session expired");
|
||||
|
||||
logger.trace("Get Workspace");
|
||||
logger.trace("Get Workspace scope group id: "+scopeGroupId);
|
||||
PortalContext pContext = PortalContext.getConfiguration();
|
||||
String scope = pContext.getCurrentScope(scopeGroupId);
|
||||
String scope;
|
||||
if(isWithinPortal())
|
||||
scope = pContext.getCurrentScope(scopeGroupId);
|
||||
else
|
||||
scope = pContext.getCurrentScope(request);
|
||||
|
||||
ScopeProvider.instance.set(scope);
|
||||
String username = user.getUsername();
|
||||
logger.info("Client context scope: "+ scope + " username: "+username);
|
||||
|
|
Loading…
Reference in New Issue