image - (Resolved) Struts2, in jsp page, img tag's attribute src ends with .action, Not working in latest Chrome browser -
I am using strips2, in my jsp page I dynamically read src Which is set to .action . This is taking action in my firefox and IE, but fails to call in the latest chrome.
Need help
& lt; IMG SRC = "/ CRD / Online User / JCAPPImage. Action" width = "180px" id = "cappaid" height = "70px" /> & Lt; / Div & gt; & Lt; S: Name of the textfield = "jcapptpresp" value = "" title = '% {getText ("app.onlineUser.tooltip.captcha")}' id = "online user_zeptaka response" /> & Lt; S: an onclick = "document.getElementById ('captchaId'). Src = 'jcaptchaImage.action #' + math.random ();" Title = '% {getText ("app.onlineUser.tooltip.reload")}' href = "#" & gt; & Lt; Img src = "& lt; s: url value =" /images/reloadIcon.png "/> align =" gram "alt =" & lt; S: text name = "app.online user.Toltip. Reload" & gt; & Lt; / S: Text & gt; "/> & lt; / s: one> When I observe the element in Chrome, then I follow the warning in the console Is happening:
"The resource image is interpreted as, but the mime type has been transferred with text / JPG:"
Lt; action name = "jcaptchaImage" class = "Org.uic .cc.crd.action.onlineUser.OnlineUserAction "method =" captcha generator "> - Interceptors are used here - & gt; & lt; not result Activity => "Success"> Tiles.Command ForumAction OnlineUserAction. Method Captcha Generator in Java < Public string CAPTCHA generator (// logic output stream output stream = empty; last string CAPTCHI = request.getSession (). GetId (); Last BufferedImage image = getImageCaptchaService () .getImageChallengeForID ( Captchaid, request.getLocale ()); // OutputStream = response.getOutputStream () to encode to JPEG Stream; ImageIO.write (image, IMAGE_FORMAT, outputstream); OutputStream.close (); Return tap; }
The issue is finally resolved :) I changed the '#' '?' In the source value i.e .. jcaptchaImage.action #jcaptchaImage.action for? . It worked. Thanks to all :) `
& lt; Img src = "/ crD / online user / jcaptchaImage.action" width = "180px" id = "captchaId" height = "70px" /> & Lt; / Div & gt; & Lt; S: Name of the textfield = "jcapptpresp" value = "" title = '% {getText ("app.onlineUser.tooltip.captcha")}' id = "online user_zeptaka response" /> & Lt; S: An onclick = "document.getElementById ('CAPTCHI'). Src = 'jcaptchaImage.action?' + Math.Random (); "Title = '% {getText (" app.onlineUser.tooltip.reload ")}' href =" # "& gt; & Lt; Img src = "& lt; s: url value =" /images/reloadIcon.png "/> align =" gram "alt =" & lt; S: text name = "app.online user.Toltip. Reload" & gt; & Lt; / S: Text & gt; "/>
Comments
Post a Comment