delputnam / icaptcha

Automatically exported from code.google.com/p/icaptcha
0 stars 0 forks source link

Not working in IE #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Installed icaptcha.war in Tomcat
2. Open http://localhost:8080/icaptcha/index.jsp
3. Click on Reload

What is the expected output? What do you see instead?
The Image should get refreshed But instead I am not able to see any image
in the location. I tries to debug it and found that in captcha.jsp while
rendering the image using Producer.render(os, solver, props), the following
error is getting thrown:

javax.imageio.IIOException: I/O error writing PNG file!
        at
com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:
1104)
        at javax.imageio.ImageWriter.write(ImageWriter.java:591)
        at javax.imageio.ImageIO.write(ImageIO.java:1434)
        at javax.imageio.ImageIO.write(ImageIO.java:1508)
        at org.smx.captcha.Producer.render(Producer.java:94)
        at org.apache.jsp.captcha_jsp._jspService(captcha_jsp.java:105)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:162)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
40)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:199)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:145)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:210)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:596)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:433)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:139)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:596)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:433)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)

        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2460)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:133)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:596)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:119)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:594)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:594)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:433)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:127)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:596)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:433)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)

        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:15
7)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:874)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:665)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:528)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:81)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:689)
        at java.lang.Thread.run(Thread.java:534)
Caused by: ClientAbortException:  java.net.SocketException: Connection reset by
peer: socket write error
        at
org.apache.coyote.tomcat4.OutputBuffer.doFlush(OutputBuffer.java:329)

        at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:297)
        at
org.apache.coyote.tomcat4.CoyoteOutputStream.flush(CoyoteOutputStream
.java:74)
        at
javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCache
ImageOutputStream.java:212)
        at
com.sun.imageio.plugins.png.ChunkStream.finish(PNGImageWriter.java:12
0)
        at
com.sun.imageio.plugins.png.PNGImageWriter.write_IHDR(PNGImageWriter.
java:368)
        at
com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:
1071)
        ... 41 more
Creating instance of FactoryLanguageImpl

What version of the product are you using? On what operating system?
I checked out the code from the svn location specified. And using the JSPs
provided in example.war. The OS is WindowsXp and IE version is 6.0.9.

Please provide any additional information below.
It is working fine with Mozilla.

Original issue reported on code.google.com by meetsub...@gmail.com on 10 Apr 2008 at 12:25

GoogleCodeExporter commented 9 years ago
Solution:
This problem is with IE6 or below. So as a solution we need to use
setTimeout('reloadcaptcha()',100) in the onclick event of Reload span.

Original comment by meetsub...@gmail.com on 15 Apr 2008 at 5:29

GoogleCodeExporter commented 9 years ago
Thanks I will update the demo file in next few days

Original comment by gregbugaj1411@gmail.com on 7 May 2008 at 6:50