após o pedido de enctype = "multipart / form-data" não está funcionando
public class Relay extends HttpServlet {
@Override
public void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String command = request.getParameter("command");
RequestDispatcher rd =request.getRequestDispatcher(command);
rd.forward(request, response);
System.out.println("Request forwarded to " + command + " servlet");
}
}
Este é o meu Relay servelt, estou enviando data de
<form action="Relay" method="POST" enctype="multipart/form-data"> /
<input type="hidden" name="command" value="AddProduct" />
<input type="text" name="pname" value="" />
<input name="" type="submit" value="Add Product">
</form>
Está dando um java.lang.NullPointerException. enctype = "multipart / form-data" // quando im remover seus trabalhos