java - Updating image in IE11 not working -


i having application upload multiple image using browse button. calling servlet performing these operations store in databse,retreive , store in database. below code of jsp page :

<%if(imagevo != null)         {%>                               <tr>                     <% if (!imagevo.getimage1().equals("")) {                     filetype = (imagevo.getimage1().substring(imagevo.getimage1().lastindexof(".")+1,imagevo.getimage1().length())).tolowercase().trim();                     system.out.println("inside if image1-=========="+filetype);                       if("jpg".equalsignorecase(filetype) || "jpeg".equalsignorecase(filetype)){ system.out.println("inside if222222 image1-=========="+filetype+"ireq"+ireq+"program type"+prog); %>                     <td align="left" colspan="4"><br/><img border="0"                           src="/servletpath/servlet?ireq=<%=ireq%>&iseq=1&targetaction=retrievepic&tabval=0&programtype=<%=prog%>"                         width="200" height="150" id="image11" name="image11"><input type="hidden" name="imagesequence1" id="imagesequence1" value="1"></td>                     <%} else {                         system.out.println("inside else image11111"); %>                     <td align="center" colspan="4" width="200" height="70"><a href="/servletpath/servlet?ireq=<%=ireq%>&iseq=1&targetaction=retrievepic&tabval=0&programtype=<%=prog%>" id="image11" name="image11"> <%=imagevo.getimage1() %> </a><input type="hidden" name="imagesequence1" id="imagesequence1" value="1"></td>                <% request.getsession().setattribute("browsetype",null);                     request.getsession().removeattribute("browsetype");                     if(request.getsession().getattribute("browsetype")!=null)                     system.out.println("value of remove browse type attr removed 333======="+(string)request.getsession().getattribute("browsetype"));} }  %>                                     <%  if (!imagevo.getimage2().equals("")) {                       filetype = (imagevo.getimage2().substring(imagevo.getimage2().lastindexof(".")+1,imagevo.getimage2().length())).tolowercase().trim();                      if("jpg".equalsignorecase(filetype) || "jpeg".equalsignorecase(filetype)){ %>                               <td align="left" colspan="3"><br/><img border="0"                         src="/servletpath/servlet?ireq=<%=ireq%>&iseq=2&targetaction=retrievepic&tabval=0&programtype=<%=prog%>"                         width="200" height="150" name="image22" id="image22"><input type="hidden" name="imagesequence2" id="imagesequence2" value="2"></td>                     <%} else {                         system.out.println("inside else image2222222222"); %>                             <td align="center" colspan="3" width="200" height="70"><a href="/servletpath/servlet?ireq=<%=ireq%>&iseq=2&targetaction=retrievepic&tabval=0&programtype=<%=prog%>" name="image22" id="image22" > <%=imagevo.getimage2() %> </a><input type="hidden" name="imagesequence2" id="imagesequence2" value="2"></td>      <%request.getsession().setattribute("browsetype",null);                          request.getsession().removeattribute("browsetype");                          if(request.getsession().getattribute("browsetype")!=null)                          system.out.println("value of remove browse type attr removed 333======="+(string)request.getsession().getattribute("browsetype"));} }  %>                         </tr>             <%} %>   

this part of code thumbnail of image displayed retrieving database.for displaying the servlet in src tag should called.
when upload image first time, flow works correctly , servlet retrieve getting called correctly. when try update image in same place,the flow going correctly(image updated in db) retreive pic servlet not getting called. issue occurring in ie11. in other lower versions of ie working correctly.
there tags/code not supported in ie11. appreciated.

it because of cache problem. changed url of servlet timestamp servlet called everytime new image. worked .

servletpath/servlet?ireq=<%=ireq%>&iseq=1&targetaction=retrievepic&tabval=0&programtype=<%=prog%>&time=<%=java.lang.system.currenttimemillis()%>" 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -