I study servlets. According to the task, you need to write a web application that can add, change, delete and display the data tables. However, JSP cannot be used. On the Internet, a lot of examples using JSP. The question is probably stupid, but I would nevertheless be grateful for the detailed answer: whether it is possible to write a web application WITHOUT using JSP - only a servlet. If so, is it possible to get a link to an example of just such an implementation of the task?

  • 3
    Of course, you can, There are plenty of such examples - just take a link to the writer from HttpServletResponse and write html to it. Here is a detailed guide from oracle . - enzo
  • Thanks, another question, how can I submit the form, i.e. let's enter a username and password, then click on the button and send to the servlet this data for later entry in the database? - PolkovnikJ
  • The wording of the question is not clear: what does "how to send the form" mean? The browser will send it. You need to create an HTML file with a form - this is static content, so it is not necessary to give it through a servlet, and then process the data received from the form in the servlet. - enzo
  • a little not clearly expressed the essence of the question, forgive me, I already have an html form with fields for entering values, and there is a sumbit button, I’m interested in how to extract these values ​​and click on the sql base, i.e. Roughly speaking, how to create an interaction between the html form (web application) and DAO (which works with tables), I asked the above example for such a plan, here's an example of the implementation that I need, though here with jsp, [link] ( danielniko. wordpress.com/2012/04/17/… ), you need something like this without using jsp. - PolkovnikJ
  • one
    You get the parameters in the servlet from the request of the h / z getParameter() method and write them to the database. Here is an example , do not hesitate to use Google. - enzo

0