🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #1017

Ayuda con el Method Post...

#1017
From: joeykami
Date: Fri, 22 Sep 2006 16:15
35 lines
2624 bytes
Intento subir un archivo (*.txt, *.xls, *.pdf, etc) desde mi formulario

jsp, de un cliente a la base de datos en sql server 2000 en forma
remota, y el problema es que no reconoce la ruta de donde esta el
archivo.
En mi formulario el form lo tengo asi:
<form method="get" name="frmAltaSumLin" action="/prosilWeb/AltaSumLin"
ENCTYPE="multipart/form-data">
Pero quiero utilizar una clase llamada MultipartRequest para q pueda
tomar el objeto completo (archivo) pero para esto, tengo que cambiar el

method="get" a method="post" en el jsp como en el servlet.
Y el servlet lo tengo asi:
public void doGest(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
por lo tanto si lo cambio a post quedaria asi:
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
pero a la hora de leer todos los parametros no me esta trayendo nada me

regresa puros nulls
String tipo =req.getParameter("tipo");
String familia = (req.getParameter("familia"));
int idco=(objsuministros.getIdCoMaxLin(idLinea,familia))+1;
String nombre = req.getParameter("nombre");
String repuesto="0";
String descripcion = req.getParameter("descripcion");
String cantidad = req.getParameter("cantidad");
String revision ="0";
String fecha = "";
String confolio = req.getParameter("confolio");
String folios = req.getParameter("folios");
String aportado = req.getParameter("aportado");
String unidad=req.getParameter("unidad");
Si alguien me prodria ayudar se lo agradeceria mucho gracias...
Technical Details
Message-ID: <1158941748.675351.159210@i3g2000cwc.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i3g2000cwc.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1116f3,c8b3e627fb2324c2,start
X-Google-Attributes: gid1116f3,public
X-Google-Language: SPANISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i3g2000cwc.googlegroups.com!not-for-mail
From: "joeykami@gmail.com" <joeykami@gmail.com>
Newsgroups: es.comp.lenguajes.java
Subject: Ayuda con el Method Post...
Date: 22 Sep 2006 09:15:49 -0700
Organization: http://groups.google.com
Lines: 36
Message-ID: <1158941748.675351.159210@i3g2000cwc.googlegroups.com>
NNTP-Posting-Host: 200.4.3.159
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1158941754 23413 127.0.0.1 (22 Sep 2006 16:15:54 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 22 Sep 2006 16:15:54 +0000 (UTC)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: i3g2000cwc.googlegroups.com; posting-host=200.4.3.159;
   posting-account=zWv_cw0AAABpSzAt2DYAWR_n1mkUl4w9