Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
 * Created on 02.09.2003
package at.spardat.xma.boot.servlet;
import  javax.servlet.ServletException;
import  javax.servlet.http.HttpServlet;
import  javax.servlet.http.HttpServletRequest;
import  javax.servlet.http.HttpServletResponse;

S2267 To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments
public class XmaLauncherServlet extends HttpServlet {
    static final private String CONTENT_TYPE = "application/x-xmalauncher; charset=UTF-8";
     //static final private String CONTENT_TYPE = "application/x-xmalauncher";
    public void doGet(HttpServletRequest req, HttpServletResponse response)
        throws ServletException, IOException {
  // Set content type and create a new PrintWriter to write the data in UTF-8*/
        //PrintWriter out = response.getWriter();
          PrintWriter out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), "UTF8"), true);
          String url=req.getRequestURL().toString();
          int index = url.lastIndexOf(".");
          if (index >=0){
             out.print(url.substring(0, index));
         if (req.getQueryString()!=null){
          Enumeration params = req.getParameterNames();
          while (params.hasMoreElements()) {
            String name = (Stringparams.nextElement();
            String values[] = req.getParameterValues(name);
            if (values != null) {
              for (int i = 0; i < values.lengthi++) {
New to GrepCode? Check out our FAQ X