Hi.. I'm a newbie in java and spring framework.. so I'm sorry if my errors are a bit.. dumb or something..

I've tried the Countries sample provided with the spring framework distribution.. and it worked perfectly..

but when I try to use the same code to generate an excel view in my application.. I always encountered this exception:

Code:
java.lang.NullPointerException
	com...OvertimeExcelView.buildExcelDocument(OvertimeExcelView.java:44)
	org.springframework.web.servlet.view.document.AbstractExcelView.renderMergedOutputModel(AbstractExcelView.java:140)
	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:219)
	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:630)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:523)
	org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:342)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:328)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
in my servlet xml:

Code:
	<bean id="overTimeFormController" 
			class="com...OverTimeFormController">
		<property name="commandName"><value>user</value></property>
		<property name="commandClass">
			<value>com...User</value>
		</property>
		<property name="formView">
			<value>overtimeView</value>
		</property>
		<property name="successView">
			<value>overTime.spring</value>
		</property>	
		<property name="validator"><ref bean="beanValidator" /></property>
	</bean>
I used a class named User to contain all the data to be shown in the view..
and my controller class code is like this:

Code:
public class OverTimeFormController extends SimpleFormController &#123;
    
    /* &#40;non-Javadoc&#41;
     * @see org.springframework.web.servlet.mvc.SimpleFormController#onSubmit&#40;javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, org.springframework.validation.BindException&#41;
     */
    protected ModelAndView onSubmit&#40;HttpServletRequest request,
            HttpServletResponse response, Object command, BindException binder&#41;
            throws Exception &#123;
        
        if&#40;request.getParameter&#40;"excel"&#41;!=null&#41;&#123;

            RefreshablePagedListHolder listHolder = 
    		    &#40;RefreshablePagedListHolder&#41; 
    		    	request.getSession&#40;true&#41;.getAttribute&#40;"user"&#41;;
    		return new ModelAndView&#40;"overtime_excelView", "user", listHolder&#41;;
            
        &#125;else&#123;
	        User user = &#40;User&#41; command;
	        BindException errors = new BindException&#40;user, "user"&#41;;
	        return new ModelAndView&#40;"overtimeView", errors.getModel&#40;&#41;&#41;;            
        &#125;
    &#125;
    
&#125;
everything is working perfectly, the validation using commons validator, viewresolving using resource bundles.. but when I try to export to excel I always get a null pointer exception

like you can see in the controller, the flow is like this..
1. the user submitted the form with some parameters (like employee number and date), and the view is returned back to the user listing his overtime data.. (the application is perfectly working until this step)
2. if the user pressed the export to excel button.. the controller will then generate the same form in excel format.. (this is where i get the exception)

I also tried supplying the User object in formBackingObject.. but that didnt seem to help..

what am I doing wrong? And am I supplying enough code? please tell me if i dont supply enough code...
any help would be appreciated.. thank you