Hi Diego,
Try this as you should first get session and then get servlet context for this
session:
evt.getSession().getServletContext().log("contextInitialized() method is
invoked");
Regards,
Moria.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
hnguyen
Sent: Wednesday, October 14, 2009 9:14 AM
To: Java EE (J2EE) Programming with Passion!
Subject: [java ee programming] Re: lab 4005
Could you provide the content of the file: C:\Documents and Settings
\diego rangel\Mis documentos\NetBeansProjects\hello2\src\java
\MyOwnEventListener.java?
On Oct 13, 2:05 pm, diego rangel <[email protected]> wrote:
> apreciated friends:
>
> i have the following error when i go the exercise that coresponds to the
> cicle life handlers an i run the myowneventlistener.java:(it correponds to
> the lab4005):
>
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\src\java\MyOwnEventListener.java:23:
> cannot find symbol
> symbol : variable servletContext
> location: class MyOwnEventListener
> servletContext = evt.getServletContext();
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\src\java\MyOwnEventListener.java:23:
> cannot find symbol
> symbol : variable evt
> location: class MyOwnEventListener
> servletContext = evt.getServletContext();
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\src\java\MyOwnEventListener.java:24:
> cannot find symbol
> symbol : variable servletContext
> location: class MyOwnEventListener
> servletContext.log("contextInitialized() method is invoked");
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\src\java\MyOwnEventListener.java:30:
> cannot find symbol
> symbol : variable servletContext
> location: class MyOwnEventListener
> servletContext.log("contextDestroyed() method is invoked");
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\src\java\MyOwnEventListener.java:36:
> cannot find symbol
> symbol : variable servletContext
> location: class MyOwnEventListener
> servletContext.log("sessionCreated() method is invoked");
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\src\java\MyOwnEventListener.java:43:
> cannot find symbol
> symbol : variable servletContext
> location: class MyOwnEventListener
> servletContext.log("sessionDestroyed() method is invoked");
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\src\java\MyOwnEventListener.java:50:
> cannot find symbol
> symbol : variable servletContext
> location: class MyOwnEventListener
> servletContext.log("requestDestroyed() method is invoked");
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\src\java\MyOwnEventListener.java:56:
> cannot find symbol
> symbol : variable servletContext
> location: class MyOwnEventListener
> servletContext.log("requestInitialized() method is invoked");
> 8 errors
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\nbproject\build-impl.xml:401: The
> following error occurred while executing this line:
> C:\Documents and Settings\diego rangel\Mis
> documentos\NetBeansProjects\hello2\nbproject\build-impl.xml:224: Compile
> failed; see the compiler error output for details.
> BUILD FAILED (total time: 5 seconds)
>
> In the editor file apears the following :
>
> servletContext.log("requestInitialized() method is invoked");
>
> servletContext is simbol not find
>
> any help that do you give me
> thanks
>
> _________________________________________________________________
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---