diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java
index 0958b926bbedb91edb82df341234af5d5fc941dc..cbf5027ba56e74c9abe0094bf0c676741ad0e71a 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java
@@ -471,10 +471,10 @@ public abstract class AbstractViewer<D extends IEntityInformationHolder> extends
                                                     new WebAppUrl(Window.Location.getProtocol(),
                                                             Window.Location.getHost(),
                                                             webApp.getCode(), getSessionId());
-                                            url.setEntityKind(entity.getEntityKind());
-                                            url.setEntityType(entity.getEntityType());
-                                            url.setEntityIdentifier(entity.getIdentifier());
-                                            url.setEntityPermId(entity.getPermId());
+                                            url.addEntityKind(entity.getEntityKind());
+                                            url.addEntityType(entity.getEntityType());
+                                            url.addEntityIdentifier(entity.getIdentifier());
+                                            url.addEntityPermId(entity.getPermId());
                                             return new WebAppComponent(url);
                                         }
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/webapp/WebAppUrl.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/webapp/WebAppUrl.java
index ac386c118f909abaac31a0fd7d64a1a2d17311ef..8929bc9c2bc836b09228aa8d726d3ed7ea811294 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/webapp/WebAppUrl.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/webapp/WebAppUrl.java
@@ -16,8 +16,7 @@
 
 package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.webapp;
 
-import com.google.gwt.http.client.UrlBuilder;
-
+import ch.systemsx.cisd.openbis.generic.shared.basic.URLMethodWithParameters;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.BasicEntityType;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind;
 
@@ -29,7 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind;
 public class WebAppUrl
 {
 
-    private UrlBuilder builder = new UrlBuilder();
+    private URLMethodWithParameters builder;
 
     public WebAppUrl(String openbisProtocol, String openbisHost, String webAppCode, String sessionId)
     {
@@ -50,49 +49,46 @@ public class WebAppUrl
             throw new IllegalArgumentException("Session id cannot be null");
         }
 
-        builder.setProtocol(openbisProtocol);
-        builder.setHost(openbisHost);
-        // TODO remove the hardcoded part after development is finished
-        builder.setPath("ch.systemsx.cisd.openbis.plugin.screening.OpenBIS/resources/applications/"
-                + webAppCode + "/html");
-        builder.setParameter(WebAppUrlParameter.SESSION_ID.getName(), sessionId);
+        builder =
+                new URLMethodWithParameters(openbisProtocol + "//" + openbisHost + "/" + webAppCode);
+        builder.addParameter(WebAppUrlParameter.SESSION_ID.getName(), sessionId);
     }
 
-    public void setEntityKind(EntityKind entityKind)
+    public void addEntityKind(EntityKind entityKind)
     {
         if (entityKind != null)
         {
-            builder.setParameter(WebAppUrlParameter.ENTITY_KIND.getName(), entityKind.name());
+            builder.addParameter(WebAppUrlParameter.ENTITY_KIND.getName(), entityKind.name());
         }
     }
 
-    public void setEntityType(BasicEntityType entityType)
+    public void addEntityType(BasicEntityType entityType)
     {
         if (entityType != null)
         {
-            builder.setParameter(WebAppUrlParameter.ENTITY_TYPE.getName(), entityType.getCode());
+            builder.addParameter(WebAppUrlParameter.ENTITY_TYPE.getName(), entityType.getCode());
         }
     }
 
-    public void setEntityIdentifier(String entityIdentifier)
+    public void addEntityIdentifier(String entityIdentifier)
     {
         if (entityIdentifier != null)
         {
-            builder.setParameter(WebAppUrlParameter.ENTITY_IDENTIFIER.getName(), entityIdentifier);
+            builder.addParameter(WebAppUrlParameter.ENTITY_IDENTIFIER.getName(), entityIdentifier);
         }
     }
 
-    public void setEntityPermId(String entityPermId)
+    public void addEntityPermId(String entityPermId)
     {
         if (entityPermId != null)
         {
-            builder.setParameter(WebAppUrlParameter.ENTITY_PERM_ID.getName(), entityPermId);
+            builder.addParameter(WebAppUrlParameter.ENTITY_PERM_ID.getName(), entityPermId);
         }
     }
 
     @Override
     public String toString()
     {
-        return builder.buildString();
+        return builder.toString();
     }
 }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/webapp/WebAppUrlTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/webapp/WebAppUrlTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..788d6a2039fad35e3e567bd45a5b36407e2d07ec
--- /dev/null
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/webapp/WebAppUrlTest.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2012 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.webapp;
+
+import junit.framework.Assert;
+
+import org.testng.annotations.Test;
+
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.BasicEntityType;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind;
+
+/**
+ * @author pkupczyk
+ */
+public class WebAppUrlTest
+{
+
+    @Test
+    public void testUrlWithoutParameters()
+    {
+        WebAppUrl url = new WebAppUrl("http:", "localhost:8888", "webapp1", "mysessionid");
+        Assert.assertEquals("http://localhost:8888/webapp1?session-id=mysessionid", url.toString());
+    }
+
+    @Test
+    public void testUrlWithNullParameters()
+    {
+        WebAppUrl url = new WebAppUrl("http:", "localhost:8888", "webapp1", "mysessionid");
+        url.addEntityKind(null);
+        url.addEntityType(null);
+        url.addEntityIdentifier(null);
+        url.addEntityPermId(null);
+        Assert.assertEquals("http://localhost:8888/webapp1?session-id=mysessionid", url.toString());
+    }
+
+    @Test
+    public void testUrlWithNotNullParameters()
+    {
+        WebAppUrl url = new WebAppUrl("http:", "localhost:8888", "webapp1", "mysessionid");
+        url.addEntityKind(EntityKind.EXPERIMENT);
+        url.addEntityType(new BasicEntityType("TEST_EXPERIMENT_TYPE"));
+        url.addEntityIdentifier("TEST_EXPERIMENT_IDENTIFIER");
+        url.addEntityPermId("TEST_EXPERIMENT_PERM_ID");
+        Assert.assertEquals(
+                "http://localhost:8888/webapp1?session-id=mysessionid&entity-kind=EXPERIMENT"
+                        + "&entity-type=TEST_EXPERIMENT_TYPE&entity-identifier=TEST_EXPERIMENT_IDENTIFIER"
+                        + "&entity-perm-id=TEST_EXPERIMENT_PERM_ID", url.toString());
+    }
+
+    @Test
+    public void testUrlWithParametersThatContainReservedCharacters()
+    {
+        WebAppUrl url = new WebAppUrl("http:", "localhost:8888", "(webapp1)", "[mysessionid]");
+        url.addEntityKind(EntityKind.EXPERIMENT);
+        url.addEntityType(new BasicEntityType("TEST EXPERIMENT TYPE"));
+        url.addEntityIdentifier("TEST/EXPERIMENT/IDENTIFIER");
+        url.addEntityPermId("TEST&EXPERIMENT&PERM&ID");
+        Assert.assertEquals(
+                "http://localhost:8888/%28webapp1%29?session-id=%5Bmysessionid%5D&entity-kind=EXPERIMENT"
+                        + "&entity-type=TEST+EXPERIMENT+TYPE&entity-identifier=TEST%2FEXPERIMENT%2FIDENTIFIER"
+                        + "&entity-perm-id=TEST%26EXPERIMENT%26PERM%26ID", url.toString());
+    }
+}