Lernkarten

Karten 62 Karten
Lernende 1 Lernende
Sprache English
Stufe Andere
Erstellt / Aktualisiert 12.09.2017 / 04.10.2017
Lizenzierung Keine Angabe     (Fabrizi)
Weblink
Einbinden
0 Exakte Antworten 62 Text Antworten 0 Multiple Choice Antworten
Fenster schliessen

What is the MVC Design pattern?

Model-View-Controller.

Separates business logic (Model, f.i. a Java class) from presentation (View, f.e. a JSP)
and provides access via Controller (f.e. a servlet).

Fenster schliessen

Assign the following three to the letters M, V and C of the MVC Design pattern:

  • Java Server Page
  • Servlet
  • Business logic
  • Model: Business logic
  • View: JSP
  • Controller: Servlet
Fenster schliessen

Which folder(s) have to be present inside the deployment environment for a web app?

Folder "WEB-INF", containing both the DD (web.xml) and
the two sub-folders "classes" and "lib".

Fenster schliessen

List the eight HTTP methods!

GET, POST, PUT, DELETE, TRACE, OPTIONS, HEAD, CONNECT

Fenster schliessen

Which steps are necessary to execute a method,
which exists inside a model class, from a servlet class?

Import the model package, instantiate the model object and invoke the method.

Fenster schliessen

What is scriptlet code?

Java code between <% and %> inside a JSP.

Fenster schliessen

How can the request- and response-objects from a servlet
be sent to a JSP "Test.jsp"?

RequestDispatcher view = request.getRequestDispatcher("Test.jsp");
view.forward(request, response);

Fenster schliessen

Which three servlet-methods are called when
and in which order by a container?

  • init(): Once, after instantiating the servlet
  • service(): After the init() method, at first incoming request
    (invokes doGet() etc. in own thread, according to HTTP request)
  • destroy(): Once, before getting eligible 4 GC