Hello, I have a form in jsp and I want to print it in a printed form, I explain a receipt printer, should I add a library or how could I do it?
this is the jsp
<%--
Document : ingreso
Created on : 20/07/2016, 12:59:42 PM
Author : jefma
--%>
<%@page import="Controlador.NumRecibo"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="icon" type="image/png" href="resource/img/index.ico"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Generar Recibo</title>
<link href="resource/css/bootstrap.min.css" rel="stylesheet"/>
<link href="resource/css/main.css" rel="stylesheet"/>
<script src="resource/js/jquery-2.1.1.min.js"></script>
<script src="resource/js/bootstrap.js"></script>
<script src="resource/js/main.js"></script>
</head>
<body>
<div class = "container">
<div class="page-header page-header2 text-left">
<img src="resource/img/logo.png" class="img-responsive " alt="Responsive image"/>
</div>
<div class="col-md-12 ">
<div class="text-right col-md-7 ">
<h3 class="media-heading colorsub"><b>Generar Ingreso</b> </h3>
</div>
<div class="text-right col-md-5 ">
<button class="btn btn-default btn-defaul btn-primary2 " type="button" onclick="history.back()">Regresar</button>
</div>
</div>
<div class="col-sm-12" style = "margin-top:120px">
<form action="IngresaMateria" method="post" class="form" id="ingresom">
<div class="col-md-12 ">
<div class="col-md-3 ">
<label class="control-label ">Recibo Numero:</label>
<input type="inputtext" class="form-control" id="nit" name="numrecibo" placeholder="NIT" value="" />
</div>
</div>
<div class="col-md-12" style = "margin-top:20px">
<div class="col-md-3 ">
<label class="control-label ">Razon social:</label>
<select id="nomFuent" name="nomFuent" class="form-control"required >
<option> </option>
<%
List<NumRecibo> lista = (List<NumRecibo>) request.getAttribute("listado");
int i = 0;
for (NumRecibo numRecibo : lista) {
String nombrefuente = (numRecibo.getNombre());
out.println("<option value=" + nombrefuente + ">" + nombrefuente + "</option>");
}
%>
</select>
</div>
<div class="col-md-3 ">
<label class="control-label ">Nit Fuente:</label>
<input type="hidden" name="i_opc" id="i_opc">
<select id="nitfuentes" name="nitfuente" class="form-control"required >
<option value="">seleccione</option>
</select>
<% for (NumRecibo numRecibo : lista) {
i++;
int t = lista.size();
if (i == t) {
String nitA = (numRecibo.getNitAsociado());
String nom = (numRecibo.getNomAsociado());
%>
</div>
<div class="col-md-3 ">
<label class="control-label ">Nit Asociado:</label>
<input type="inputtext" class="form-control" id="nit" name="nitSocio" placeholder="NIT" value="<%=nitA%>" />
</div>
<div class="col-md-3 ">
<label class="control-label ">Nombre Asociado:</label>
<input type="text" class="form-control" id="Razonsocial" name="nomSocio" placeholder="Razon social" value="<%=nom%>">
</div><%}
}%>
</div>
<div class="col-sm-12" style = "margin-top:20px">
<table id="tablaMateriales" class="table table-bordered" >
<thead>
<tr>
<th rowspan="2" scope="col">No</th>
<th rowspan="2" scope="col ">Clase Residuo</th>
<th rowspan="2" scope="col">Tipo Residuo</th>
<th rowspan="2" scope="col">Cantida Kilos</th>
<th rowspan="2" scope="col">Valor Unitario</th>
<th rowspan="2" scope="col">Valor Total</th>
<th colspan="2" scope="col">Rechazo</th>
</tr>
<tr>
<th scope="col" >Kilos</th>
<th scope="col">Valor</th>
</tr>
</thead>
<tbody>
<tr>
<td class="col-sm-1 ">1</td>
<td class="col-sm-2 "><select id="tipomaterial" name="tipomaterial" class="form-control " required="">
<option value="0" selected="selected"> </option>
<option value="Metales" >Metales </option>
<option value="Papel-Carton" >Papel-Carton</option>
<option value="Plasticos" >Plasticos</option>
<option value="Vidrio" >Vidrio</option>
<option value="Reuso" >Reuso</option>
</select></td>
<td class="col-sm-2 "><select id="tiporesiduo" name="tiporesiduo" class="form-control ">
</select></td></td>
<td class="col-sm-1 "><input type="text" id="txtCantidadKilos" pattern="[0-9]" name="kilos" maxlength="6" type="number" step="0.01" class="form-control"></td>
<td class="col-sm-1 "><input type="text" id="txtValorUnitario" name="ValorUnitario" class="form-control"></td>
<td class="col-sm-2 "><input type="text" id="txtValorTotal" name="ValorTotal"class="form-control"></td>
<td class="col-sm-1 "><input type="text" id="txtKilosRechazo" name="KilosRechazo" class="form-control"></td>
<td class="col-sm-2 "><input type="text" id="txtValorRechazo" class="form-control"></td>
<td class="text-center">
</tr>
</tbody>
</table>
<input id="hiddenValorTotal" name="valortotal"type="hidden" value="0" />
<input id="hiddenSubtotal" name="valorSubtotal"type="hidden" value="0" />
<input id="hiddenTotalRechazo" type="hidden" value="0" />
<input id="tabla" name="tabla" type="hidden" value="" />
<table id ="gridMateriales" class="table table-bordered table-responsive table-hover" >
<thead>
<tr>
<th rowspan="2" scope="col">Remove</th>
<th rowspan="2" scope="col">No</th>
<th rowspan="2" scope="col">Clase Residuo</th>
<th rowspan="2" scope="col">Tipo Residuo</th>
<th rowspan="2" scope="col">Cantida Kilos</th>
<th rowspan="2" scope="col">Valor Unitario</th>
<th rowspan="2" scope="col">Valor Total</th>
<th colspan="2" scope="col">Rechazo</th>
</tr>
<tr>
<th scope="col" >Kilos</th>
<th scope="col">Valor</th>
</tr>
</thead>
</table>
<table id ="tablatotales" class="table table-bordered table-responsive " >
<tr>
<td class="col-sm-1">
</td>
<td class="col-sm-5">
</td>
<td class="col-sm-2 active col colorstit">
Sub Total
</td>
<td class="col-sm-2 active col">
<span id="granSubtotal"></span>
</td>
</tr>
<tr>
<td class="col-sm-1">
</td>
<td class="col-sm-5">
</td>
<td class="col-sm-2 active col colorstit">
IVA
</td>
<td class="col-sm-2 active col">
</td>
</tr>
<tr>
<td class="col-sm-1">
</td>
<td class="col-sm-5">
</td>
<td class="col-sm-2 active col colorstit">
Total
</td>
<td class="col-sm-2 active col">
<span id="granTotal"></span>
</td>
</tr>
</table>
<div class= "tamanobotton btn btn-primary btn-defaul" id="btnnuevo">Nuevo</div>
</div>
<div class="col-md-12 "style = "margin-top:40px">
<button class="btn btn-default btn-defaul btn-primary2 pull-right " name="Ingresar" type="submit" >Ingresar</button>
</div>
<div class="col-md-12 ">
<div class="page-header text-center page-header2">
<img src="resource/img/logo2.jpg" class="img-responsive center-block" alt="Responsive image"/>
</div>
</div>
</div>
</form>
</body>
</html>