request.getParameter("var") should return a null if there is no variable
named var in your form input.  You could test the return value to see if it
is null, and either report an error, set a default, etc:

String var = request.getParameter("var");
if (var == null)
{
   var = "defaultvalue"; // or error processing, etc.
}
----- Original Message -----
From: Silvia Gaspar <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 18, 2000 4:35 AM


> Hello
>
> I'm trying to post some parameters in to a servlet from a html form, but
an
> error occurs - "500 internal error". I believe it's because the
> request.getParameter("var")  doesn't return anything (due to some text
> fields being empty). I was wondering if someone could tell how I could
> overcome this situation - simply putting it, I was wondering how I could
> send in to the servlet, empty values without occurring this error.
>
> Thank you
>
>
>
> Com os nossos melhores cumprimentos,
> --------------------------------------------------------------------------
--
> -------------------------------
> Compta - Equipamentos e Servi�os de inform�tica, S.A
>
> S�lvia Gaspar
> Engenharia de Sistemas e Aplica��es
> Implementa��o
> Consultora  S�nior
> *  TEL: +351.21. 350 14 00
> *  Directo:     +351.21. 313 55 51
> *    Fax:       +351.21.352 02 02
> * e-mail:    [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> * WWW:      www.compta.pt <http://www.compta.pt>
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to