import javax.xml.transform.*; import javax.xml.transform.stream.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; public class servlet extends HttpServlet{ public void doGet(HttpServletRequest kysimus, HttpServletResponse vastus) throws IOException, ServletException { PrintWriter valja = vastus.getWriter(); vastus.setContentType("text/html"); try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection cn=DriverManager.getConnection("jdbc:odbc:AndmeBaas2", "", ""); String maakond2=kysimus.getParameter("maakond"); Transformer tolkija=TransformerFactory.newInstance(). newTransformer(new StreamSource("c:/temp/Mall3.xsl")); tolkija.setParameter("otsing", maakond2); tolkija.transform( new StreamSource("c:/temp/XMLfail.xml"), new StreamResult(valja) ); cn.close(); }catch(Exception viga){ viga.printStackTrace(valja);} } }