Leider funktioniert das immer noch nicht das ist mein gesamter code den du hier abgebildet siehst.
public class neu extends HttpServlet {
public void init(ServletConfig config) throws ServletException
{
super.init(config);
}
public void doGet (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException, java.net.MalformedURLException
{
// The servlet returns HTML.
response.setContentType("text/html; charset=UTF-8");
// Output goes in the response stream.
PrintWriter out = response.getWriter();
try
{
TransformerFactory tFactory = TransformerFactory.newInstance();
// Get the XML input document and the stylesheet.
Source xmlSource = new StreamSource(new URL("file:/WEB-INF/menu.xml").openStream());
Source xslSource = new StreamSource(new URL("file:menu2.xsl").openStream());
// Generate the transformer.
Transformer transformer = tFactory.newTransformer(xslSource);
// Perform the transformation, sending the output to the response.
transformer.transform(xmlSource, new StreamResult(out));
}
catch (Exception e)
{
out.write(e.getMessage());
e.printStackTrace(out);
}
out.close();
}
}