Académique Documents
Professionnel Documents
Culture Documents
JSP
Fill in the blanks in each of the following statements:
Action __________ has the ability to match request parameters to properties of the
same name in a bean by specifying "*" for attribute property.
There are four key components to JSPs: __________, __________, __________ and
__________.
The implicit objects have four scopes: __________, __________, __________ and.
__________
The __________ directive is processed once at JSP translation time and causes
content to be copied into the JSP.
Classes and interfaces specific to JavaServer Pages programming are located in
packages __________ and __________ .
[Page 1325]
JSPs normally execute as part of a Web server that is referred to as the __________ .
JSP scripting components include __________, __________, __________, __________ and
__________ .
State whether each of the following is true or false. If false, explain why.
An object with page scope exists in every JSP of a particular Web application.
Directives specify global information that is not associated with a particular JSP
request.
Action <jsp:include> is evaluated once at page translation time.
Like XHTML comments, JSP comments and script-language comments appear in the
response to the client.
Objects with application scope are part of a particular Web application.
Each page has its own instances of the page-scope implicit objects.
Action <jsp:setProperty> has the ability to match request parameters to properties
of the same name in a bean by specifying "*" for attribute property.
Objects with session scope exist for the client's entire browsing session.
ALL:
SERVLET - ANS
a) Servlet. b) doGet, doPost. c) getWriter. d) action. e) localhost.
False. Servlets are usually used on the server side.
True.
False. The two most common HTTP request types are get and post. The put request
type is often not allowed for security reasons.
False. The well-known port number on a Web server where requests for HTML
documents are made is 80. Port 8080 is the Tomcat servlet container's default port.
JSP ANS
a) <jsp:setProperty>. b) directives, actions, scripting elements, tag libraries. c)
application, page, request, session. d) include. e) javax.servlet.jsp,
javax.servlet.jsp.tagext. f) JSP container. g) scriptlets, comments, expressions,
declarations, escape sequences.
a) False. Objects with page scope exist only as part of the page in which they are
used. b) True. c) False. Action <jsp:include> enables dynamic content to be included
in a JavaServer Page. d) False. JSP comments and script-language comments are
ignored and do not appear in the response. e) False. Objects with application scope
are part of the JSP container application. f) True. g) True. h) True.
QUIZ 02
Nama
NIM
Isian Singkat.
1. Kelas HttpServlet dan GenericServlet meng-implement interface __________.
2. Kelas HttpServlet mendefinisikan dua method yaitu __________dan
__________untuk merespon request get dan post dari sebuah client.
3. Method dari HttpServletResponse __________ menerima sebuah outputstream
berbasis character yang memungkinkan data teks untuk dikirim ke client.
4. Dalam JSP, Action __________ mempunyai kemampuan untuk mengambil nilai
dari sebuah atribut property dari sebuah bean sesuai dengan mengisi
parameter dengan nama atribut tersebut.
5. Terdapat 4 komponen utama dalam JSP : __________, __________, __________ dan
__________.
6. Implicit objects mempunyai 4 scope yaitu : __________, __________, __________
dan. __________
Web Service.
JIka terdapat class Pegawai.java
public class Pegawai {
public String nama = Joko;
public int golongan = 4;
private float gaji = 5000;
public float getUpah(){
return this.gaji;
}
}
Jika pada sebuah operation pada web service mempunyai return value
berupa class Pegawai tersebut. Bagaimanakah format pesan SOAP response
yang dikirim ke client?