Is your ImageServlet a servlet or a POJO? Is fileManager a bean
defined in your Spring context files.
Matt
On Oct 26, 2007, at 8:53 AM, kace wrote:
Hi guys ive got a bean imageServlet which dishes out images
managed bean looks like:
<managed-bean>
<managed-bean-name>imageServlet</managed-bean-name>
<managed-bean-
class>com.mobileanarchy.gym.webapp.action.ImageServlet</managed-
bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>fileManager</property-name>
<value>#{fileManager}</value>
</managed-property>
</managed-bean>
and I am setting the fileManager in imageServlet :
private FileManager fileManager;
public void setFileManager(FileManager fileManager) {
this.fileManager = fileManager;
}
but at this line imageFile = fileManager.getFile(1L); its giving me
a null
pointer exception.
Where am i going wrong - if i call this line from any of the other
beans it
works but here it gives me problems. Am i missing something here?
Appreciate any insight.
..kace
--
View this message in context: http://www.nabble.com/null-pointer-
exception-%21%21-tf4697752s2369.html#a13428694
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
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]