Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

empty JSP page is landing

t sathya narayana
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Empty JSP is landing. My code at client side is

Webcam.snap( function(data_uri) {
document.location.href = 'display.jsp?img='+encodeURIComponent(dat);

At server side means in display.jsp the code is like

String st=request.getParameter("img");
java.awt.image.BufferedImage image = null;
byte[] imageByte;
sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();
imageByte = decoder.decodeBuffer(st); bis = new;
image =;
if(image!= null)
javax.imageio.ImageIO.write(image, "jpg", new"d://1.jpg"));

In display.jsp I need to save captured image. The URI look like

var uri ="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQo...";

and also I'm getting exception in server

Sep 24, 2014 12:45:39 AM org.apache.coyote.http11.AbstractHttp11Processor proces
INFO: Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic