27 HTML to servlet communication using hyperlink |Adv Java Servlet Programming Tutorial advance java

Publié le: 24 novembre 2017
sur la chaîne: tech fort
2,069
60

#Example #web #application on #HTML #to #servlet #communication #using #hyperlink: #adv java #Advance #Java #Servlet #Programming #Tutorial
So far we supplied input values to the servlet program of web application by typing query string with request parameter in browsers adderss/URL bar as like:

http://localhost:2020/DateApp/test1?sno=209&sname=yogesh

Using query string request param to supply input values is not industry standard because that does not provide user-friendly user interface to end user. To provide GUI to end user we need to work with HTML form pages & web pages with hyerlinks.

To make these form pages & hyperlinks generating request to servlet/JSP programs we need HTML-servlet/jsp communication

diag

Form page generated request carries the form data as input data/request parameter values to server.

Hyeperlink generated request does not carry input data along with request message body.

diag:

Note: HTML program generates static web pages.
Servelt , JSP programs can generate both static, dyanamic web page.
There is no need of configuring HTML programs in web.xml file.
HTML programs are identified with their file names with extension (.html or .htm)

#Create Example Web application on HTML to servlet communication using hyperlink:
=======================================================================
Deployment Directory structor:
9WishApp (web-root/context folder)
-------
|
|--------page.html
|--------WEB-INF
|
|------web.xml (configuration file)
|------classes
|
|------WishServlet.java
|------WishServlet.class

Note: Always place .html, .jsp, images files in web-root directory of web application(outside the WEB-INF folder/directory)

a href="http://localhost:2020/9WishApp/wurl"

wurl: URL pattern of WishServlet Program

use below URL to hit:
http://localhost:2020/9WishApp/page.html


Sur cette page du site, vous pouvez voir la vidéo en ligne 27 HTML to servlet communication using hyperlink |Adv Java Servlet Programming Tutorial advance java durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur tech fort 24 novembre 2017, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,069 fois et il a aimé 60 téléspectateurs. Bon visionnage!