struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab yazbeck <rabli...@yahoo.co.uk>
Subject accessing servlet from an ActionForm
Date Tue, 24 Jun 2003 20:59:25 GMT
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message