Monday, June 15, 2009

JSP form getting submitted twice

When i was working in the struts2,hibernate and spring technology, strangely "null pointer exception" thrown for attribute which used in the form even i give valid input.

I dig this issue and found that, struts action called twice when i request for the URL. Again this also crazy for me. When debug the application, found that browser sending new request if any empty 'src' in the <img> tag present in the code.


<img src="">

In our case browser sent second request with empty form[no data] . so obviously "null pointer exception".

so take out or give the valid image src name and this will fix the problem.


Post a Comment