<HTML>
<HEAD><TITLE>File list</TITLE></HEAD>
<%@ page import="java.io.*, javax.media.jai.*"%>
<jsp:useBean id="manip" scope="session" class="viewer.JAIManipBean" />

<%
  response.setContentType("image/jpeg");
  String par = request.getParameter("images");
  if (par == null) par = "lena.gif";
  String rot = request.getParameter("rotAngle");
  String mag = request.getParameter("magFactor");
  double magFactor = 0.0, rotAngle = 0.0;
  try {
     rotAngle = Math.toRadians((Double.valueOf(rot)).doubleValue());
     manip.setRotationAngle(rotAngle);
     } catch(Exception e) {}
  try{
     magFactor = (Integer.valueOf(mag)).intValue()/100.0;
     manip.setMagFactor(magFactor);
  } catch(Exception e) {}
  String imagepath = application.getRealPath(par);
  System.out.println("imagepath = "+imagepath);
  ServletOutputStream out1 = response.getOutputStream();
  manip.manipAndPost(imagepath, out1);
 %>

</BODY></HTML>