105 |
req.setAttribute("stationID", station ); |
req.setAttribute("stationID", station ); |
106 |
getServletContext().getRequestDispatcher("/ViewDepartures.jsp").forward(req,resp); |
getServletContext().getRequestDispatcher("/ViewDepartures.jsp").forward(req,resp); |
107 |
} else { |
} else { |
108 |
throw new ServletException("Unknown format"); |
resp.sendError(400, "Unknown format"); |
109 |
} |
} |
110 |
|
|
111 |
} |
} |
171 |
//transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); |
//transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); |
172 |
transformer.setOutputProperty(OutputKeys.METHOD, "xml"); |
transformer.setOutputProperty(OutputKeys.METHOD, "xml"); |
173 |
transformer.setOutputProperty(OutputKeys.ENCODING,"ISO-8859-1"); |
transformer.setOutputProperty(OutputKeys.ENCODING,"ISO-8859-1"); |
174 |
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); |
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "1"); |
175 |
transformer.setOutputProperty(OutputKeys.INDENT, "yes"); |
transformer.setOutputProperty(OutputKeys.INDENT, "yes"); |
176 |
java.io.StringWriter sw = new java.io.StringWriter(); |
java.io.StringWriter sw = new java.io.StringWriter(); |
177 |
StreamResult sr = new StreamResult(sw); |
StreamResult sr = new StreamResult(sw); |