struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pranava Swaroop <stalin.pran...@gmail.com>
Subject Null Pointer Exception when i use execand Wait with file upload
Date Fri, 15 Mar 2013 23:21:08 GMT
Hello I am trying to use execandWait interceptor with fileUpload
interceptor as below. i tried completestack in place of default and i get
Null pointer exception.


<action name="File_singleUpload" class="employee.SingleFileUploadAction"
method="upload">
            <interceptor-ref name="fileUpload">
                <param name="maximumSize">1000000000</param>
                <param name="allowedTypes">
                    image/gif,image/jpeg,image/png
                </param>
            </interceptor-ref>
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="execAndWait">
                <param name="delay">1500</param>
            </interceptor-ref>
            <result name="wait">/jsp/wait.jsp</result>
            <result name="success">/jsp/SingleUpload.jsp</result>
        </action>


java.lang.NullPointerException
	org.apache.struts2.ServletActionContext.getServletContext(ServletActionContext.java:139)
	employee.SingleFileUploadAction.upload(SingleFileUploadAction.java:58)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:597)
	com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:446)
	com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:285)
	org.apache.struts2.interceptor.BackgroundProcess$1.run(BackgroundProcess.java:57)
	java.lang.Thread.run(Thread.java:680)



Please advise what i can do.


-- 
Warm Regards
Pranava S Balugari

"Keep Looking Don't Settle"

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message