import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;

public class TaludServlet extends HttpServlet {

  public void doGet(HttpServletRequest request, HttpServletResponse response)
  throws IOException, ServletException
  {
    PrintWriter err = null;
    try{

      err = new PrintWriter(new FileOutputStream("c:\\temp\\viga.doGet.txt"));
      
      String what = request.getParameter("what");

      if (what != null && what.equals("mobla") ) {

          response.setContentType("text/plain");
          PrintWriter valja = response.getWriter();
          valja.println("mobla");

      } else {
          response.setContentType("text/html");
           System.out.println("kuku");
          //Turismitalud.sendHTMLToStream(System.out);
          Turismitalud.sendHTMLToStream(response.getOutputStream());
      }

    }catch(Exception viga){
      viga.printStackTrace(response.getWriter());
      try{
        viga.printStackTrace(err);
      }catch(Exception e){e.printStackTrace();}
    }
  }

}