Web Development with Java



Download 1,94 Mb.
Pdf ko'rish
bet17/82
Sana14.07.2022
Hajmi1,94 Mb.
#797363
1   ...   13   14   15   16   17   18   19   20   ...   82
Bog'liq
Web Development With Java

session-confi g
>
<
session-timeout
>
30
session-timeout
>
session-confi g
>
<
welcome-fi le-list
>
<
welcome-fi le
>
index.jsp
welcome-fi le
>
<
welcome-fi le
>
index.html
welcome-fi le
>
<
welcome-fi le
>
index.htm
welcome-fi le
>
welcome-fi le-list
>
web-app
>
Web Application Location
Web applications are run by servlet engines. Each servlet engine will have a special 
location for web applications. For the Tomcat servlet engine, all web applications 
should be located in the 
webapps
directory.
NetBeans is a Java development environment that is packaged with Tomcat. It 
is very easy to confi gure NetBeans to run web applications. There will be a discus-
sion of NetBeans in a later section in this chapter.
For other servlet engines, check the documentation to determine where web 
applications should be placed.
1.4.2 JSP

Java Server Page
[JSP] contains HTML tags and plain text, just like a regular web 
page. In addition, a JSP can contain Java code that is executed when the page is 
displayed. As long as it is contained in a web application, a JSP will be able to 
process the form data that is sent to it.


18
Web Development with Java
JSP Location
For now, the location of JSPs will be in the root directory of the web application, 
not in the WEB-INF directory. The WEB-INF directory is not accessible directly 
through a web browser. Later, you will see how it is possible to place a JSP inside 
the WEB-INF directory so that access to the JSP can be restricted.
Accessing Form Data
In the servlet specifi cation 2.0, there is a new language that has been added to JSPs 
that simplifi es access to objects that are available to a JSP. This language is known 
as the 
Expression Language
[EL]. EL statements start with a dollar sign and are 
surrounded by curly braces.
${EL-statement}
The EL statement for accessing data in the query string uses the word 
param
and 
the name of the form element that contained the data.
${param.name_of_element}
Consider the query string of 
hobby=water+skiing
. To retrieve the value of 
the hobby parameter from the query string, insert 
${param.hobby}
anywhere 
inside the JSP.
<

Download 1,94 Mb.

Do'stlaringiz bilan baham:
1   ...   13   14   15   16   17   18   19   20   ...   82




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish