can I get a solid example in struts with latest features included

varun: I need one with html-el if possible
Thanks

KiranKumar (Raj)
ext 7203


-----Original Message-----
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 5:05 PM
To: 'Struts Users Mailing List'
Subject: RE: accessing servlet from an ActionForm


I would access the ServletContext from the execute or the perform method
rather than the constructor.

this.servlet.getServletContext().getAttribute("XXX")

This is what I use from inside the execute and it works great.


-----Original Message-----
From: rab yazbeck [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 3:59 PM
To: [EMAIL PROTECTED]
Subject: accessing servlet from an ActionForm


Hi.

I am trying to get access to the servlet container
(getServletContext().getAttribute(attrName)) from an
ActionForm but I receive an error
(NullPointerException). 

It is strange because the controller servlet instance
(ActionServlet) exist in the ActionForm, but every
time I try to access it, it gives me an error (NullPointerException).

The ActionForm is crated by an <html-el:form>, and I
am trying to access this servlet from within the
constructor of this ActionForm (is it good practice to
do that?)

That attributes were already stored successfully
(plug-in) at the start-up of the application.

Help please, thank you in advance.

Rab.


__________________________________________________
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to