i am trying to make a servlet in netbeans. It has to be called from an html form and take some data from it.
i overwrite doget and dopost putting just some testing outs in them.
when i try to run the servlet it only shows a hello word jsp page i found out that this was the index.jsp page that the servlet had by default.
How can i make the servlet run and actually make some output? other than the index welcome page?
Which url mast i use in order to call the servlet from the form?
th doget and dopost methods look like this
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
ResourceBundle rb =
ResourceBundle.getBundle("LocalStrings",request.getLocale());
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
String title = rb.getString("helloworld.title");
out.println("<title>" + title + "this is my anser</title>");
out.println("</head>");
out.println("</html>");
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
this.doPost(request, response);}