Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying confirmation window using servlets

 
Led Estonilo
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well i look up the web, but the best example I saw was



and I dont like the idea, I assume there is a way to display warning boxes or confirmation windows using servlets. anyone know how to do this
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't use Servlets to generate warning messages or confirmation boxes, that is plain old HTML or JavaScript for that matter.

Servlets are there to process a request, and determine what at all to serve back to the client. Eventually, you end up rendering a plain old HTML file.
 
Led Estonilo
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so for every page that needs a warning i create a different html page?

i manage to generate htlm message that i can re-use, im just asking if it is possible to create confirmation window using servlets.
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can create an JSP page in which you display the confirmation message. The confirmation message is determined by your servlet, which then forwards to the JSP.
 
Led Estonilo
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ohh thats better, thank you very much.



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic