Lernkarten

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

What are filters used for?

To intercept and process requests before they are sent to the servlet,
or to process responses after the servlet has completed
(but before the response goes back to the client).

Fenster schliessen

Which Interface and method(s) must be implemented to create a filter,
which can be defined inside the DD?

Implement Filter and its 
doFilter(ServletRequest req, ServletResponse resp, FilterChain chain),
init(FilterConfig config) and destroy() method.

Fenster schliessen

How can the next filter be called, from inside the doFilter() method?

chain.doFilter(req, resp);

Fenster schliessen

How can a filter be declared inside the DD and mapped to a specific servlet?

<filter>
  <filter-name>
MyRequest</filter-name>
  <filter-class>
com.example.web.MyRequestFilter</filter-class>
  <init-param> 
<-- optional!
    <param-name>LogFileName</param-name>
    <param-value>
UserLog.txt</param-value>
  </init-param>
</filter>

<filter-mapping>
  <filter-name>
MyRequest</filter-name>
  <servlet-name>
AnyServlet</servlet-name>
</filter-mapping>

Fenster schliessen

Which four dispatcher types can be declared inside the <filter-mapping>-tag of the DD?

<dispatcher>REQUEST</dispatcher>
<dispatcher>
INCLUDE</dispatcher>
<dispatcher>
FORWARD</dispatcher>
<dispatcher>
ERROR</dispatcher>

Fenster schliessen

Which are the four wrapper classes to create a custom request or response object?

  • ServletRequestWrapper
  • HttpServletRequestWrapper
  • ServletResponseWrapper
  • HttpServletResponseWrapper
Fenster schliessen

What is JNDI?

JNDI stands for Java Naming and Directory Interface.
It’s an API to access naming and directory services. 

Fenster schliessen

What does RMI stand for?

Remote Method Invocation