diff --git a/pom.xml b/pom.xml
index 4013698..4555176 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,13 +9,7 @@
   <url>http://maven.apache.org</url>  
   
   <dependencies>	
-   <!--  <dependency>
-    	<groupId>de.tuebingen.uni.sfs</groupId>
-    	<artifactId>wlf1</artifactId>
-    	<version>0.4</version>
-    </dependency> -->
-    
-    <dependency>
+	<dependency>
         <groupId>eu.clarin.weblicht</groupId>
         <artifactId>wlfxb</artifactId>
         <version>1.2.9</version>
@@ -27,16 +21,20 @@
    	  <scope>provided</scope>
     </dependency>
     <dependency>
+    	<groupId>com.sun.jersey</groupId>
+    	<artifactId>jersey-server</artifactId>
+    	<version>1.13</version>
+    </dependency>
+    <dependency>
+    	<groupId>com.sun.jersey</groupId>
+    	<artifactId>jersey-servlet</artifactId>
+    	<version>1.13</version>
+    </dependency>    
+    <dependency>
   	  <groupId>org.apache.httpcomponents</groupId>
   	  <artifactId>httpclient</artifactId>
   	  <version>4.3.3</version>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
+    </dependency>    
     <!-- <dependency>
    	  <groupId>org.slf4j</groupId>
    	  <artifactId>slf4j-simple</artifactId>
@@ -47,6 +45,11 @@
 	  <artifactId>slf4j-log4j12</artifactId>
 	  <version>1.7.5</version>
 	</dependency>
+    <dependency>
+    	<groupId>org.apache.commons</groupId>
+    	<artifactId>commons-lang3</artifactId>
+    	<version>3.3.2</version>
+    </dependency>
   </dependencies>
   <build>
     <finalName>SRU-WS</finalName>
diff --git a/src/main/java/de/mannheim/ids/sruws/Corpus.java b/src/main/java/de/mannheim/ids/sruws/Corpus.java
index b980e15..3d80def 100644
--- a/src/main/java/de/mannheim/ids/sruws/Corpus.java
+++ b/src/main/java/de/mannheim/ids/sruws/Corpus.java
@@ -3,19 +3,27 @@
 import java.util.ArrayList;
 import java.util.List;
 
-public class Corpus {
+public class Corpus {	
 	String name;
 	String pid;
-	List<String[]> tokenizedSentences;
+	List<Sentence> sentences;
 	
 	public Corpus(String pid, String name) {
 		this.pid = pid;
 		this.name = name;
-		tokenizedSentences =new ArrayList<String[]>();
+		this.sentences = new ArrayList<Sentence>();		
 	}
 	
-	public void addSentence(String sentence){
-		tokenizedSentences.add(sentence.split("\\s+"));
+	public List<Sentence> getSentences() {
+		return sentences;
+	}
+
+	public void setSentences(List<Sentence> sentences) {
+		this.sentences = sentences;
+	}
+
+	public void addSentence(Sentence s){
+		sentences.add(s);
 	}
 	
 	public String getName() {
@@ -30,13 +38,4 @@
 	public void setPid(String pid) {
 		this.pid = pid;
 	}
-	public List<String[]> getTokenizedSentences() {
-		return tokenizedSentences;
-	}
-	public void setTokenizedSentences(List<String[]> tokenizedSentences) {
-		this.tokenizedSentences = tokenizedSentences;
-	}
-
-	
-	
 }
diff --git a/src/main/java/de/mannheim/ids/sruws/SRU_WS.java b/src/main/java/de/mannheim/ids/sruws/SRU_WS.java
index fa7d21d..a58e14c 100644
--- a/src/main/java/de/mannheim/ids/sruws/SRU_WS.java
+++ b/src/main/java/de/mannheim/ids/sruws/SRU_WS.java
@@ -9,14 +9,24 @@
 import java.net.URISyntaxException;
 import java.net.URLDecoder;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.StreamingOutput;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
@@ -25,8 +35,8 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.events.XMLEvent;
 
+import org.apache.commons.lang3.ArrayUtils;
 import org.apache.http.HttpEntity;
-import org.apache.http.HttpHeaders;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.utils.URIBuilder;
@@ -37,7 +47,6 @@
 import org.xml.sax.SAXException;
 
 import eu.clarin.weblicht.wlfxb.io.WLDObjector;
-import eu.clarin.weblicht.wlfxb.io.WLFormatException;
 import eu.clarin.weblicht.wlfxb.tc.api.MatchedCorpus;
 import eu.clarin.weblicht.wlfxb.tc.api.MatchesLayer;
 import eu.clarin.weblicht.wlfxb.tc.api.SentencesLayer;
@@ -50,12 +59,14 @@
  * @author margaretha
  * */
 
-public class SRU_WS extends HttpServlet{
+@Path("/")
+public class SRU_WS{
 	
 	private String endpointUri;
 	private String endpointBase = "de.mannheim.ids.sruws.endpoint.";
-	private String DUMMY_PID = "Wikipedia";
+	private Corpus defaultCorpus;
 	
+	private static final int DEFAULT_MAX_RECORDS = 10;
 	private static final String HITS_NS = "http://clarin.eu/fcs/dataview/hits";
     private static final String HITS_PREFIX = "hits";    
     private static final String FCS_NS = "http://clarin.eu/fcs/1.0";
@@ -65,11 +76,85 @@
         
     private static String CORPUS_LANG = "de";
     private static String QUERY_LANG = "CQL";   
-	private Map<String,Corpus> corpusList = new HashMap<String,Corpus>();
-    
-	private Logger logger = (Logger) LoggerFactory.getLogger(SRU_WS.class);
-	private SAXParserFactory factory = SAXParserFactory.newInstance();
-			
+	private Map<String,Corpus> corpusList;
+	private SAXParserFactory factory;
+	private Logger logger;
+	
+	@Context
+	ServletConfig config;	
+	
+	public SRU_WS() {
+		logger = (Logger) LoggerFactory.getLogger(SRU_WS.class);
+		factory = SAXParserFactory.newInstance();
+		corpusList = new HashMap<String,Corpus>();
+	}
+	
+	@GET
+	@Produces(MediaType.TEXT_XML)
+	public StreamingOutput doGet(@QueryParam("query") String query, 
+			@QueryParam("endpoint") String endpoint, 
+			@QueryParam("maximumRecords") int maximumRecords) throws IOException, ServletException{
+		return process(endpoint, query,  maximumRecords);
+	};
+	
+	@POST
+	@Produces(MediaType.TEXT_XML)
+	@Consumes("text/query-cql")
+	public StreamingOutput doPost(@QueryParam("query") String query, 
+			@QueryParam("endpoint") String endpoint, 
+			@QueryParam("maximumRecords") int maximumRecords) throws IOException, ServletException{
+		
+		return process(endpoint, query,  maximumRecords);				
+	}
+	
+	private StreamingOutput process(String endpoint, String query, int max) 
+			throws IOException, ServletException {		
+		
+		if (endpoint == null || endpoint.isEmpty()){
+			throw new WebApplicationException(
+					Response.status(Response.Status.BAD_REQUEST)
+							.entity("Endpoint parameter cannot be empty.")
+							.type(MediaType.TEXT_PLAIN).build());
+		}
+		else if (config.getInitParameter(endpointBase+endpoint) == null){
+			throw new WebApplicationException(
+					Response.status(Response.Status.BAD_REQUEST)
+							.entity("Endpoint URL for the endpoint parameter cannot be found.")
+							.type(MediaType.TEXT_PLAIN).build());
+		}
+		else if (query == null || query.isEmpty()){
+			throw new WebApplicationException(
+					Response.status(Response.Status.BAD_REQUEST)
+							.entity("Query cannot be empty.")
+							.type(MediaType.TEXT_PLAIN).build());
+		}
+					
+		if (max==0) max = DEFAULT_MAX_RECORDS;
+		
+		endpointUri = config.getInitParameter(endpointBase+endpoint);
+		logger.info("Endpoint URL {} ",endpointUri);
+		
+		generateCorpusList();
+		logger.info(query.toString());
+		
+		HttpGet getReq = createSearchRetrieveRequest(query, max);			
+		CloseableHttpClient httpClient = HttpClients.createDefault();
+		CloseableHttpResponse httpResponse = httpClient.execute(getReq);
+		HttpEntity httpEntity = httpResponse.getEntity();
+		BufferedInputStream bis = new BufferedInputStream(httpEntity.getContent());
+		
+		String text;
+		try {
+			text = readKwicInput(bis);
+			//logger.info(text);
+		} catch (XMLStreamException e) {				
+			throw new ServletException("XML streaming error");
+		}			
+		
+		return writeTCL(text, query);
+		
+	}
+	
 	private void generateCorpusList() throws IOException{
 		corpusList = new HashMap<String, Corpus>();
 		
@@ -94,106 +179,20 @@
 			SAXParser saxParser = factory.newSAXParser();
 			SRUScanResonseHandler handler = new SRUScanResonseHandler();
 			saxParser.parse(bis, handler);
-			corpusList = handler.getCorpora();
+			corpusList = handler.getCorpora();					
 			
 		} catch (ParserConfigurationException | SAXException e) {
 			e.printStackTrace();
 		}
-	}
 		
-	@Override
-	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
-			throws ServletException, IOException {
-						
-		String endpoint = req.getParameter("endpoint");
-		String query = req.getParameter("query");
-		String max = req.getParameter("maximumRecords");
-		
-		if (!req.getHeader(HttpHeaders.ACCEPT).equals("text/query-cql")){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
-					"Only Accept request-header of mediatype 'text/query-cql' is accepted.");
-		}
-		else if (endpoint == null || endpoint.isEmpty()){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
-					"Endpoint parameter cannot be empty.");
-		}
-		else if (getServletConfig().getInitParameter(endpointBase+endpoint) == null){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
-					"Endpoint parameter is incorrect.");
-		}
-		else if (query == null || query.isEmpty()){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "Query cannot be empty.");
-		}		
-		else if (max == null || max.isEmpty() || max.equals("0")){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST, 
-					"The maximumRecords must be specified greater than 0.");
-		}
-		else{			
-			
-			endpointUri = getServletConfig().getInitParameter(endpointBase+endpoint);
-			logger.info("Endpoint URL {} ",endpointUri);		
-			
-			generateCorpusList();
-			
-			HttpGet getReq = createSearchRetrieveRequest(query, req.getParameter("maximumRecords"));			
-			CloseableHttpClient httpClient = HttpClients.createDefault();
-			CloseableHttpResponse httpResponse = httpClient.execute(getReq);
-			HttpEntity httpEntity = httpResponse.getEntity();
-			BufferedInputStream bis = new BufferedInputStream(httpEntity.getContent());
-			
-			//List<String[]> tokenizedSentences = new ArrayList<String[]>();
-			String text;
-			try {
-				//text = readInput(bis, tokenizedSentences);
-				text = readKwicInput(bis);
-				//logger.info(text);
-			} catch (XMLStreamException e) {				
-				throw new ServletException("XML streaming error");
-			}
-			
-			writeTCL(resp.getOutputStream(), text, query);
-			//writeTCL(resp.getOutputStream(), text, tokenizedSentences, query);
-		}
+		defaultCorpus = new Corpus(endpointUri, endpointUri);
+		corpusList.put(endpointUri, defaultCorpus);
 	}
-	
-	public void writeTCL(OutputStream out, String text, List<String[]> tokenizedSentences, String query){
-		TextCorpusStored textCorpus = new TextCorpusStored(CORPUS_LANG);
+			
+	private StreamingOutput writeTCL(String text, String query){
+		final TextCorpusStored textCorpus = new TextCorpusStored(CORPUS_LANG);
 		textCorpus.createTextLayer().addText(text);
-
-		TokensLayer tokensLayer = textCorpus.createTokensLayer();
-		SentencesLayer sentencesLayer = textCorpus.createSentencesLayer();	
-		MatchesLayer matchesLayer = textCorpus.createMatchesLayer(QUERY_LANG, query);
-		MatchedCorpus matchedCorpus = matchesLayer.addCorpus("Wikipedia", "WikiPID");
 		
-		List<Token> itemToken = new ArrayList<Token>();
-		for (int i=0; i<tokenizedSentences.size();i++){			
-			List<Token> sentenceTokens = new ArrayList<Token>();				
-			for (String tokenString : tokenizedSentences.get(i)) {
-				
-				Token token = tokensLayer.addToken(tokenString);
-				sentenceTokens.add(token);
-				
-				if (tokenString.equalsIgnoreCase(query)){
-					itemToken.add(token);
-				}
-			}
-			sentencesLayer.addSentence(sentenceTokens);
-			matchesLayer.addItem(matchedCorpus, itemToken);
-			itemToken.clear();
-		}
-		
-		WLData wlData = new WLData(textCorpus);
-		try {
-			WLDObjector.write(wlData, out);
-		} catch (WLFormatException e) {			
-			e.printStackTrace();
-		}
-	}
-	
-	public void writeTCL(OutputStream out, String text, String query){
-		TextCorpusStored textCorpus = new TextCorpusStored(CORPUS_LANG);
-		textCorpus.createTextLayer().addText(text);
-
 		TokensLayer tokensLayer = textCorpus.createTokensLayer();
 		SentencesLayer sentencesLayer = textCorpus.createSentencesLayer();	
 		MatchesLayer matchesLayer = textCorpus.createMatchesLayer(QUERY_LANG, query);
@@ -201,38 +200,49 @@
 		Corpus c;
 		MatchedCorpus matchedCorpus; 
 		for (String pid : corpusList.keySet()){
-			c = corpusList.get(pid);
-			if (c.getTokenizedSentences().size() == 0) continue;
+			c = corpusList.get(pid);			
+			//logger.info(pid);
+			List<Sentence> sentences = c.getSentences();
+			if (sentences.size() == 0) continue;
 			
-			matchedCorpus = matchesLayer.addCorpus(c.getName(), c.getPid());
-			
-			List<String[]> tokenizedSentences = c.getTokenizedSentences();
+			matchedCorpus = matchesLayer.addCorpus(c.getName(), c.getPid());			
 			List<Token> itemToken = new ArrayList<Token>();			
 			
-			for (int i=0; i<tokenizedSentences.size();i++){
+			for (Sentence sentence : sentences){								
+				List<Token> sentenceTokens = new ArrayList<Token>();
 				
-				List<Token> sentenceTokens = new ArrayList<Token>();				
-				for (String tokenString : tokenizedSentences.get(i)) {
+				String[] tokenStrings = sentence.getTokens();				
+				int[] keyIndexes = sentence.getKeyIndexes();				
+				
+				int j=0; // counter for keyIndexes				
+				for (int k = 0; k < tokenStrings.length; k++) {
 					
+					String tokenString = tokenStrings[k];
 					Token token = tokensLayer.addToken(tokenString);
-					sentenceTokens.add(token);
-					
-					if (tokenString.equalsIgnoreCase(query)){
-						itemToken.add(token);
+					sentenceTokens.add(token);	
+										
+					if (j < keyIndexes.length && keyIndexes[j] == k){
+						itemToken.add(j,token);
+						j++;
 					}
-				}
-				sentencesLayer.addSentence(sentenceTokens);
+				}		
+				
+				sentencesLayer.addSentence(sentenceTokens);		
 				matchesLayer.addItem(matchedCorpus, itemToken);
 				itemToken.clear();
 			}
 		}
 		
-		WLData wlData = new WLData(textCorpus);
-		try {
-			WLDObjector.write(wlData, out);
-		} catch (WLFormatException e) {			
-			e.printStackTrace();
-		}
+		return new StreamingOutput() {			
+			@Override
+			public void write(OutputStream output) throws IOException,
+					WebApplicationException {				
+				WLData wlData = new WLData(textCorpus);
+				WLDObjector.write(wlData, output);
+				output.flush();
+			}
+		};
+		
 	}
 	
 	private String readKwicInput(InputStream is) throws XMLStreamException, UnsupportedEncodingException{
@@ -259,12 +269,10 @@
 						String pid = reader.getAttributeValue(i);						
 						logger.info("Corpus: " + URLDecoder.decode(pid,"UTF-8"));						
 						c = corpusList.get(URLDecoder.decode(pid,"UTF-8"));
-						if (c == null) c = corpusList.get(DUMMY_PID);
-						//logger.info(c.getPid());
+						if (c == null) c = defaultCorpus;
 					}					
 				}
 			}
-				
 							
 			else if (e == XMLEvent.START_ELEMENT &&
 					reader.getLocalName().equals("kwic") ){
@@ -273,35 +281,38 @@
 			
 			else if (e == XMLEvent.START_ELEMENT &&
 					reader.getLocalName().equals("c") ){					
-				reader.next();
-				sb.append(reader.getText());
+				e = reader.next();
+				while (e == XMLEvent.CHARACTERS){
+					//logger.info("context: "+reader.getText());
+					sb.append(reader.getText());
+					e = reader.next();
+				}
 				sb.append(" ");
 			}				
 
 			else if (e == XMLEvent.START_ELEMENT &&
 					reader.getLocalName().equals("kw")){				
-				reader.next();
-				sb.append(reader.getText());
-				sb.append(" ");
-			}
-			
-			else if (e == XMLEvent.START_ELEMENT &&
-					reader.getLocalName().equals("c")){					
-				reader.next();
-				sb.append(reader.getText());
-				sb.append(" ");
+				e = reader.next();
+				if (e == XMLEvent.CHARACTERS){
+					String keyword = reader.getText();
+					sb.append("#");
+					sb.append(keyword);
+					sb.append("# ");	
+				}
 			}
 			
 			else if (e == XMLEvent.END_ELEMENT && 
 					reader.getLocalName().equals("kwic")){
+				
 				kwic = normalizeString(sb.toString());
-				//logger.info("sentence {}", kwic);
-				c.addSentence(kwic);					
-				kwicCollector.append(kwic);
+				Sentence s = createSentence(kwic);
+				c.addSentence(s);
+				//logger.info(kwic);
+				kwicCollector.append(s.getSentenceString());				
 			}				
 		}
 		return kwicCollector.toString();
-	}
+	}	
 	
 	private String readInput(InputStream is, List<String[]> tokenizedSentences) 
 			throws XMLStreamException{
@@ -346,20 +357,55 @@
 		return kwicCollector.toString();
 	}
 	
-	private String normalizeString(String text){
+	private Sentence createSentence(String kwic){
+		String[] tokens = kwic.split("\\s+");				
+		int open = ArrayUtils.indexOf(tokens,"#");
+		tokens = ArrayUtils.remove(tokens, open);
+		int close = ArrayUtils.lastIndexOf(tokens,"#");				
+		tokens= ArrayUtils.remove(tokens, close);
+		
+		int[] keyIndexes = new int[close-open];
+		int j=0;
+		for (int i=open; i<close; i++){
+			//logger.info(i+" "+tokens[i]);
+			keyIndexes[j] = i;
+			j++;
+		}
+		
 		StringBuilder sb = new StringBuilder();
+		for (String t: tokens){
+			sb.append(t);
+			sb.append(" ");
+		}
+		String sentenceString = sb.toString();
+		
+		return new Sentence(sentenceString, tokens, keyIndexes);		
+	}
+	
+	private String normalizeString(String text){
+		boolean isPrevPunctuation = false;
+		
+		StringBuilder sb = new StringBuilder();		
 		for (int j = 0; j < text.length(); j++){
 			char temp = text.charAt(j);					
 			if (!Character.isDigit(temp) && !Character.isLetter(temp)){						
 				if (temp == '\''){ sb.append(temp);	}
-				else { sb.append(" "+temp);	}							
+				else { 
+					sb.append(" ");
+					isPrevPunctuation = true;
+				}							
 			}
-			else{ sb.append(temp); }
+			sb.append(temp);
+			
+			if (isPrevPunctuation) {
+				sb.append(" ");
+				isPrevPunctuation = false;
+			}
 		}
-		return sb.toString();			
+		return sb.toString().replaceAll("\\s+", " ");			
 	}	
 	
-	private HttpGet createSearchRetrieveRequest(String query, String maximumRecords) 
+	private HttpGet createSearchRetrieveRequest(String query, int maximumRecords) 
 			throws ServletException{
 		try {
 			URIBuilder builder = new URIBuilder(endpointUri);	
@@ -367,7 +413,7 @@
 			builder.setParameter("version", "1.2");
 			builder.setParameter("query", query);
 			builder.setParameter("startRecord", "1");
-			builder.setParameter("maximumRecords", maximumRecords);
+			builder.setParameter("maximumRecords", String.valueOf(maximumRecords));
 			URI requestURI = builder.build();
 			return new HttpGet(requestURI);
 		}
diff --git a/src/main/java/de/mannheim/ids/sruws/Sentence.java b/src/main/java/de/mannheim/ids/sruws/Sentence.java
new file mode 100644
index 0000000..705f720
--- /dev/null
+++ b/src/main/java/de/mannheim/ids/sruws/Sentence.java
@@ -0,0 +1,34 @@
+package de.mannheim.ids.sruws;
+
+public class Sentence{
+	
+	String sentenceString;
+	String[] tokens;
+	int[] keyIndexes;		
+	
+	public Sentence(String str, String[] tokens, int[] keyIndexes) {
+		this.sentenceString = str;		
+		this.tokens = tokens;
+		this.keyIndexes = keyIndexes;
+	}
+	
+	public String getSentenceString() {
+		return sentenceString;
+	}
+	public void setSentenceString(String sentenceString) {
+		this.sentenceString = sentenceString;
+	}
+	
+	public String[] getTokens() {
+		return tokens;
+	}
+	public void setTokens(String[] tokens) {
+		this.tokens = tokens;
+	}
+	public int[] getKeyIndexes() {
+		return keyIndexes;
+	}
+	public void setKeyIndexes(int[] keyIndexes) {
+		this.keyIndexes = keyIndexes;
+	}		
+}
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 022a9df..ffee5c4 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,6 +1,6 @@
 
-log4j.rootLogger=DEBUG, STDOUT
-log4j.de.mannheim.ids.sruws.SRU_WS = INFO, STDOUT
+log4j.rootLogger=INFO, STDOUT
+log4j.de.mannheim.ids.sruws.SRU_WS = DEBUG, STDOUT
 
 log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
 log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 27ff16c..d2235e6 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -1,9 +1,18 @@
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="SRU_WEB_SERVICE">
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app id="SRU_WEB_SERVICE">
   <display-name>SRU Web-service</display-name>
   
   <servlet>    
     <servlet-name>SRU_WS</servlet-name>        
-    <servlet-class>de.mannheim.ids.sruws.SRU_WS</servlet-class>
+    <!-- <servlet-class>de.mannheim.ids.sruws.SRU_WS</servlet-class> -->
+    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+    <init-param>
+      <param-name>com.sun.jersey.config.property.packages</param-name>
+      <param-value>de.mannheim.ids.sruws</param-value>
+    </init-param>
     <init-param>
         <param-name>de.mannheim.ids.sruws.endpoint.korap</param-name>
         <param-value>http://clarin.ids-mannheim.de/korapsru</param-value>
@@ -24,34 +33,45 @@
         <param-name>de.mannheim.ids.sruws.endpoint.stuttgart</param-name>
         <param-value>http://clarin01.ims.uni-stuttgart.de/SRUCQIBridge</param-value>
     </init-param>
-    <!-- same case like goethe, pid is sub-resource -->
-    <init-param> 
-        <param-name>de.mannheim.ids.sruws.endpoint.muenchen</param-name>
-        <param-value>https://clarin.phonetik.uni-muenchen.de/BASSRU/</param-value>
-    </init-param>
-    <!-- weird pid -->
-    <init-param>
-        <param-name>de.mannheim.ids.sruws.endpoint.mpi</param-name>
-        <param-value>http://cqlservlet.mpi.nl/</param-value>
-    </init-param>   
-    <!-- doesnt provide scan -->		
-    <init-param>
-        <param-name>de.mannheim.ids.sruws.endpoint.saarland</param-name>
-        <param-value>http://fedora.clarin-d.uni-saarland.de/sru2</param-value>
-    </init-param>
-    <!-- empty pid -->
+
+    <!-- empty pid -->    
     <init-param>
         <param-name>de.mannheim.ids.sruws.endpoint.berlin</param-name>
         <param-value>http://dspin.dwds.de:8088/DDC-Endpoint/sru</param-value>
-    </init-param>
+    </init-param>    			 
+
+    
+    <!-- broken sentences -->
+    
+    <!-- same case like goethe, pid is sub-resource  -->    
+    <!-- <init-param> 
+        <param-name>de.mannheim.ids.sruws.endpoint.muenchen</param-name>
+        <param-value>https://clarin.phonetik.uni-muenchen.de/BASSRU/</param-value>
+    </init-param> -->
+    
+    <!-- weird pid -->
+    <!-- <init-param>
+        <param-name>de.mannheim.ids.sruws.endpoint.mpi</param-name>
+        <param-value>http://cqlservlet.mpi.nl/</param-value>
+    </init-param> -->  
+    
     <!-- pid doesn't match -->
-    <init-param>
+    <!-- <init-param>
         <param-name>de.mannheim.ids.sruws.endpoint.hamburg</param-name>
         <param-value>http://virt-fedora.multilingua.uni-hamburg.de:8080/HZSKsru/</param-value>
-    </init-param>			 
+    </init-param> -->
+     
+    <!-- doesnt provide scan -->		
+   <!--  <init-param>
+        <param-name>de.mannheim.ids.sruws.endpoint.saarland</param-name>
+        <param-value>http://fedora.clarin-d.uni-saarland.de/sru2/</param-value>
+    </init-param> -->
+    
+    <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
     <servlet-name>SRU_WS</servlet-name>
     <url-pattern>/*</url-pattern>
-  </servlet-mapping>
+  </servlet-mapping>  
+ 
 </web-app>
\ No newline at end of file
diff --git a/src/test/java/de/mannheim/ids/sruws/test/TestClient.java b/src/test/java/de/mannheim/ids/sruws/test/TestClient.java
index ee14d32..45de13d 100644
--- a/src/test/java/de/mannheim/ids/sruws/test/TestClient.java
+++ b/src/test/java/de/mannheim/ids/sruws/test/TestClient.java
@@ -1,11 +1,14 @@
 package de.mannheim.ids.sruws.test;
 import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.http.HttpEntity;
 import org.apache.http.HttpHeaders;
 import org.apache.http.HttpResponse;
 import org.apache.http.NameValuePair;
@@ -19,15 +22,15 @@
 		
 	public static void main(String arg[]) throws IOException{
 		String url =
-				"http://localhost:8080/SRU-WS/";
-				//"http://clarin.ids-mannheim.de/sruws/";
+				//"http://localhost:8080/SRU-WS/";
+				"http://clarin.ids-mannheim.de/sruws/";
 		
 		HttpClient client = HttpClients.createDefault();
 		HttpPost post = new HttpPost(url);		
-		post.setHeader(HttpHeaders.ACCEPT,"text/query-ddc");		
+		post.setHeader(HttpHeaders.ACCEPT,"text/query-cql");		
 		
 		List<NameValuePair> urlParameters = new ArrayList<NameValuePair>();
-		urlParameters.add(new BasicNameValuePair("query", "rot"));
+		urlParameters.add(new BasicNameValuePair("query", "Baden-Württemberg"));
 		urlParameters.add(new BasicNameValuePair("maximumRecords", "5"));
 		urlParameters.add(new BasicNameValuePair("endpoint", "korap")); 
 		post.setEntity(new UrlEncodedFormEntity(urlParameters));
@@ -41,13 +44,16 @@
 			System.out.println("Response Code : " + 
 					response.getStatusLine().getReasonPhrase());
 		}
+				
+		FileWriter fw = new FileWriter(new File("test.xml"));
 		
 		BufferedReader reader = new BufferedReader(new InputStreamReader(
 				response.getEntity().getContent()));
 		String line;
 		while ((line = reader.readLine()) != null){
-			System.out.println(line);
+			//System.out.println(line);
+			fw.append(line+"\n");
 		}
-		
+		fw.close();
 	}	
 }
