Creo que esta pregunta es sencilla pero ya he tirado mucho codigo y no lo logro....
Expongo el problema...hago una carga de un archivo atravez de FILEUPLOAD y todo funciona bien, guardo en la base de datos y todo perfecto...pero cuando hago click sobre el boton que lo hace no me muetra los mensajes de "SUBIENDO ARCHIVO PLANO"....O PROCESANDO....si no hasta que termina....aqui el codigo que lanza el cargue (obviamente solo pego lo que interesa)
Código Java:
Ver original<form action="CargarArchivo2.jsp;" method="post" enctype="multipart/form-data" >
<input type="file" name="file">
<input type="submit" value="Subir Archivo">
aqui el que recibe (pego solo la parte del FILEUPLOAD)
Código Java:
Ver original<body>
<IMG SRC="sgv2/../../Recursos/encabezadogris.jpg" ALT="SIGEV 2.0">
<TABLE width="100%">
<TR>
<TD ALIGN="left" style=" font-weight: 700;color: darkolivegreen">CARGUES ARCHIVOS PLANOS</TD>
<td ALIGN="left"><IMG SRC="sgv2/../../Recursos/inicio.jpg" height="30px" ALT="SIGEV 2.0" onclick=location.href="sgv2/../../sgvPrincipal.jsp"></td>
</TR>
</TABLE>
<h2>SUBIENDO ARCHIVO...</h2><h3>Por favor espere un momento</h3>
<%
int modo=1; //modo me dervira para definir si es actualizacion o borrado y recargue
//abro conexion
try {
connL = Conexion.getConexion();
System.
out.
println(e.
getMessage()); }
if (connL != null) {
//creo el preparedstatement para hacer los insert
//armo el ps para insertar datos
"insert into sgv2_indicadores_det(indi_det_cod_ind,indi_det_anio,indi_det_mes,indi_det_geo,"
+ "indi_det_emi,indi_det_cont,indi_det_prod,indi_det_subp,indi_det_codfunc,indi_det_campo1,"
+ "indi_det_campo2,indi_det_campo3,indi_det_campo4,indi_det_campo5,indi_det_fecpro,indi_det_usuario)"
+ "values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
"update sgv2_indicadores_det "
+ "set indi_det_cod_ind=?,"
+ "indi_det_anio =?,"
+ "indi_det_mes =?,"
+ "indi_det_geo =?,"
+ "indi_det_emi =?,"
+ "indi_det_cont =?,"
+ "indi_det_prod =?,"
+ "indi_det_subp =?,"
+ "indi_det_codfunc=?,"
+ "indi_det_campo1 =?,"
+ "indi_det_campo2 =?,"
+ "indi_det_campo3 =?,"
+ "indi_det_campo4 =?,"
+ "indi_det_campo5 =?,"
+ "indi_det_fecpro =?,"
+ "indi_det_usuario=?"
+"where indi_det_cod_ind=? and "
+"indi_det_anio =? and "
+ "indi_det_mes =? and "
+ "indi_det_geo =? and "
+ "indi_det_emi =? and "
+ "indi_det_cont =? and "
+ "indi_det_prod =? and "
+ "indi_det_subp =? and "
+ "indi_det_codfunc=?"
);
String archivourl
="D:\\Datos\\SGV2"; DiskFileItemFactory factory = new DiskFileItemFactory();
factory.setSizeThreshold(1024);
factory.
setRepository(new File(archivourl
)); ServletFileUpload upload = new ServletFileUpload(factory);
try{
List<FileItem> partes = upload.parseRequest(request);
for(FileItem items:partes){
File file
=new File(archivourl, items.
getName()); items.write(file);
String rutaFichero
=file.
getName(); SGVCargarPlano carga = new SGVCargarPlano();
carga.muestraContenido(file);
}......ETC
Si se fijan arranca pintando el mensaje
Código Java:
Ver original<h2>SUBIENDO ARCHIVO...</h2><h3>Por favor espere un momento</h3>
Pero lo muestra es ya cuando termina de cargar el plano....agradezco las ideas.