Inicio > java, servlets > MK_25052011

MK_25052011

Es ist nicht möglich mit dem init() Method mit einem anderen Server eine Verbidung erstellen. Es gibt auch keine Möglichkeit zu wissen, ob der Server schon gestartet und bereits für eine Anfrage ist oder nicht. Meine Idee war ein anderes Service zu erstellen aber scheinbar lohn es sich nicht.

Mit ServletContextListener funktioniert auch nicht. Wenn das ServletContextListener ausgeführt ist, ist der Server noch nicht bereits.

Servlets:
- init()
- service()
- destroy()
- doGet()
- doPost()

web.xml

<servlet></servlet>

<servlet-mapping></servlet-mapping>

Servlet Context
  • Alle Servlets haben das gleiche Servlet Context
  • Es gibt ein Context pro Web-Anwendung
Servlet Listener
Servlet Context Listener
  • Interface
  • Receives notifications
  • Es muss in der Descriptor Datei konfiguriert sein
  • Executed once the web application is deployed
  • Detects when the application is removed
Http Session Listener
  • HttpSessionListener befasst sich mit dem Objekt HttpSession
  • Links

    http://www.java-tips.org/java-tutorials/tutorials/introduction-to-servlet-listener-using-eclipse.html

    Categorías:java, servlets
    1. Aún no hay comentarios.
    1. Aún no hay trackbacks

    Deja un comentario

    Fill in your details below or click an icon to log in:

    Logo de WordPress.com

    You are commenting using your WordPress.com account. Log Out / Cambiar )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Cambiar )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Cambiar )

    Connecting to %s

    Seguir

    Get every new post delivered to your Inbox.