Lecture 13 & 14 - Servlets - Advanced Topics Flashcards

1
Q

Describe state in terms of Servlets?

A

•HTTP is stateless
–Once a webserver has dealt with a request the connection vanishes
–The server cannot recognize that a sequence of requests is from the same client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the solution to avoid the lack of state?

A

Session Tracking
–Hidden form fields
–URL rewriting
–Cookies
–Sessions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are cookies?

A
  • Information that a server gives to a client
  • On request, the client returns the information

•Used for
–Identifying a user during an e-commerce (or other) session
–Avoiding user-name and password
–Customizing a site
–Focusing advertising

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the problems with Cookies?

A
  • Some browsers do not support cookies
  • Users can disable cookies
  • Cookies cannot be larger than 4kb
  • Only 20 cookies per domain
  • No more than 300 cookies stored at client
  • Expiry is up to browser (even though you can specify a value)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Discuss servlets in regards to larger applications?

A

•Servlets cooperate to create content
•Multiple servlets in a chain
–request parameters supplied to first servlet
–output from each Servlet piped to the next Servlet in the chain
–last servlet in chain sends output to client

•Example use:
–Servlet #1: Translates XSQL page to XML page
–Servlet #2: Translates XML to HTML using XSL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly