The answer for my above question is that instead of declaring the fileUploadMaxBytes in web.xml in the manner I did above, the declaration should be in the place where you configure your dwrContoller. i.e.
<dwr:controller id="dwrController" debug="true" >
<dwr:config-param name="fileUploadMaxBytes" value="1048"/>
</dwr:controller>
Now with the help of this, I am able to restrict the image size to 1048 bytes.
Earlier my dwrController configuration is as shown below
<dwr:controller id="dwrController" debug="true" />