Re: how to pipe values from select-Tag ?

Patricio Vera <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
        Hi,

        You form clausule must be before than you select clausule....

Regards,
PV

-----Mensaje original-----
De: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[email protected]]En nombre de
Fuchur1476 huuil
Enviado el: Miércoles, 17 de Septiembre de 2003 07:23
Para: [email protected]
Asunto: Re: how to pipe values from select-Tag ?


Hi there,

WOW this is the way I had it long time ago...
Well thank you veryy much, this error message has disappeared but...
please look at this :

!!!!!!!!!!! // Values are filled with projectNames...checked in HTML-code

out.println("<select name=\"proField\" "
+"<option><---------------------------------------------------></option>");
for(i = 1; i<length;i=i+2)
{
    out.println("<option value=\""+vec.get(i)+"\">"+vec.get(i)+"</option>");
}
   out.println("</select>");
      i=0;

out.println("<FORM ACTION =
\"http://10.48.229.45/examples/servlet/SelectedProject\" METHOD = \"GET\">"+
"<input type = \"submit\" name=\"edit\" value = \" edit\" height=\"20\"
width=\"10\">"+
"<input type=\"hidden\" name=\"alias\" value=\""+alias+"\" >");
out.println("</form>"+

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////


public class SelectedProject extends HttpServlet implements
SingleThreadModel{

        private static String alias = "";

        private static String path="";
        String gbpfad = "gb.txt";
        public void doGet (HttpServletRequest requ,HttpServletResponse resp)
                     throws ServletException, IOException
    {

            String[] pfad = requ.getParameterValues("proField");

           // NullPointerException because pfad=null ????
                  path = pfad[0].toString();

           alias = requ.getParameter("alias").toLowerCase().trim();
..............


// Whats wrong there ? The Array is null. Not filled yet.
String pfad[] = requ.getParameterValues("proField");
//is right, but why is nothing transfered to it ?



THX
Bastian













"A mailing list for discussion about Sun Microsystem's Java
Servlet API Technology." <[email protected]> schrieb am 17.09.03
11:43:40:
>
> Hi,
>
> > There's errormessage :
> >
> >                C:\ServletDevel\WebExcel\CheckLoginMod.java:127: cannot
> resolve symbol
> >                    symbol  : method getParameterValues
(java.lang.String)
> >                    location: class CheckLoginMod
> >         String[] pfad = getParameterValues("proField" );
> >                                 ^
>
> this is the way to use GetParameter
>
>  public void doget(HttpServletRequest req, HttpServletResponse res) throws
> IOException{
>
> String[] pfad = req.getParameterValues("proField" );
> }
> Then u will not get error messages
>
> Shekhar
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003
>
>
___________________________________________________________________________
> 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


____________________________________________________________________________
__
Zwei Mal Platz 1 mit dem jeweils besten Testergebnis! WEB.DE FreeMail
und WEB.DE Club bei Stiftung Warentest! http://f.web.de/?mc=021183

___________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.