child.appendChild(text);
}
return child;
}
/**
* Инициализация.
*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
/**
* Основной метод сервлета
*/
public void service(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
// Выставляем тип содержимого
response.setContentType("text/html");
// Инициализируем выходящий поток
OutputStreamWriter o_sw =
new OutputStreamWriter(response.getOutputStream());
PrintWriter out = new PrintWriter(response.getOutputStream());
// Получаем объекты
cookie Cookie[] cookies = request.getCookies();
// Создаем выходящий документ
XMLDocument doc = new XMLDocument();
// Создаем корневой элемент
Request Element elRequest = doc.createElement("Request");
doc.appendChild(elRequest);
// Создаем элемент General