diff --git a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java
index 7595e87..1cfac2a 100644
--- a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java
+++ b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java
@@ -6,6 +6,8 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
+
+import javax.ws.rs.BadRequestException;
 import javax.ws.rs.FormParam;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
@@ -16,6 +18,8 @@
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.ResponseBuilder;
+import javax.ws.rs.core.Response.Status;
+
 import com.fasterxml.jackson.core.JsonFactory;
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.databind.JsonNode;
@@ -33,6 +37,16 @@
      * response as json(all of the response) and
      * as rtf(matches)
      * 
+     * @param fname
+     *            file name
+     * @param format
+     *            the file format value rtf or json.
+     * @param q
+     *            the query
+     * @param ql
+     *            the query language
+     * 
+     * 
      */
     @POST
     @Path("export")
@@ -41,7 +55,18 @@
             @FormParam("format") String format, @FormParam("q") String q,
             @FormParam("ql") String ql) throws IOException {
 
+        String[][] params = { { "fname", fname }, { "format", format },
+                { "q", q }, { "ql", ql } };
 
+        for (int i = 0; i < params.length; i++) {
+            if (params[i][1] == null || params[i][1].trim().isEmpty())
+                throw new BadRequestException(Response
+                        .status(Status.BAD_REQUEST).entity("Parameter " + "\""
+                                + params[i][0] + "\"" + " is missing or empty")
+                        .build());
+        }
+
+        ResponseBuilder builder;
         Client client = ClientBuilder.newClient();
 
         String url = "http://localhost:8089/api/v1.0/search?context=sentence"
@@ -49,7 +74,6 @@
         WebTarget resource = client.target(url);
         String resp = resource.request(MediaType.APPLICATION_JSON)
                 .get(String.class);
-        ResponseBuilder builder;
 
         //format == json
         if (format.equals("json")) {
diff --git a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/IdsExportServiceTest.java b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/IdsExportServiceTest.java
index 5b73cba..57c1d91 100644
--- a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/IdsExportServiceTest.java
+++ b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/IdsExportServiceTest.java
@@ -3,6 +3,10 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
 import javax.ws.rs.client.Entity;
 import javax.ws.rs.core.Application;
 import javax.ws.rs.core.HttpHeaders;
@@ -33,8 +37,7 @@
     // Client is pre-configured in JerseyTest
     /**
      * Tests if webservice returns a document with the right filename
-     * and file
-     * format.
+     * and file format and handles empty/missing parameters correctly.
      */
     @Test
     public void testExportWs () {
@@ -47,6 +50,8 @@
         frmap.add("q", "Wasser");
         frmap.add("ql", "poliqarp");
 
+        String message;
+
         Response responsejson = target("/export").request()
                 .post(Entity.form(frmap));
         assertEquals("Request JSON: Http Response should be 200: ",
@@ -84,6 +89,37 @@
         assertTrue("Request RTF: Filename should be set correctly: ",
                 responsertf.getHeaderString(HttpHeaders.CONTENT_DISPOSITION)
                         .contains("filename=" + filenamer));
+
+        Response resp;
+        String fvalue;
+        MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>();
+        map.putAll(frmap);
+
+        //Checks missing or empty parameters
+        for (String fkey : frmap.keySet()) {
+            //parameter is missing
+            fvalue = frmap.getFirst(fkey);
+            map.remove(fkey);
+            resp = target("/export").request().post(Entity.form(map));
+            assertEquals("Request RTF: Http Response should be 400: ",
+                    Status.BAD_REQUEST.getStatusCode(), resp.getStatus());
+            message = resp.readEntity(String.class);
+            assertTrue(
+                    "Right Exception Message should be returned for missing format",
+                    message.contains(
+                            "Parameter \"" + fkey + "\" is missing or empty"));
+            //parameter is empty
+            map.putSingle(fkey, "");
+            resp = target("/export").request().post(Entity.form(map));
+            assertEquals("Request RTF: Http Response should be 400: ",
+                    Status.BAD_REQUEST.getStatusCode(), resp.getStatus());
+            message = resp.readEntity(String.class);
+            assertTrue(
+                    "Right Exception Message should be returned for missing format",
+                    message.contains(
+                            "Parameter \"" + fkey + "\" is missing or empty"));
+            map.putSingle(fkey, fvalue);
+        }
     }
 
 }
