<%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@page import="org.w3c.dom.*,java.io.*,java.net.*,java.util.*,javax.servlet.*,javax.servlet.http.*"%> JSP Page <%try{%> <% String fileName; String fileN=request.getParameter("fileName"); if(request.getParameter("Add").equals("Add")){ fileName=application.getRealPath("data")+"/"+ fileN+".xml"; } else{ fileName=application.getRealPath("data")+"/"+ fileN; } %> <% String name=request.getParameter("Name"); String speed=request.getParameter("Speed"); String range=request.getParameter("Range"); String sign=request.getParameter("Sign"); String className=request.getParameter("className"); xml.setXml(fileName,className,name,speed,range,sign); response.sendRedirect("AdminMode.jsp"); %> <%} catch (Exception x) {%> <%= "Exception"+x %> <%}%>