hi all,

  I have a login_page.html with 2 fields ( named 1:username and
   2:pass_code) and when submitted, it's call
  response.jsp which will call bean: NameHandler to access form data.
  However, I've tried with 1 form field and it
  works. But when I try to read 2 form fields it gives me an error.

  pls look at it if u all can spare the time.

  brenda

  here's the code for response.jsp

  <%@ page import="myb.NameHandler" %>

  <jsp:useBean id="mybeanb" scope="session" class="myb.NameHandler"/>
  <jsp:setProperty name="mybeanb" property="username" param="username" />
  <jsp:setProperty name="mybeanb" property="pass_code" param="pass_code"
/>

  <HTML>
  <head>
  <title> </title>
  </head>
  <BODY>
  <jsp:getProperty name="mybeanb" property="username" />
  <jsp:getProperty name="mybeanb" property="pass_code" />
  </BODY>
  </HTML>

  here's the code for bean NameHandler

  package myb;

  public class NameHandler {

      private String username, pass_code;


       public NameHandler() {
          username = null;
          pass_code = null;
      }


      public void setUsername( String formName ) {
          username = formName;
      }


      public String getUsername() {
          return username;
      }

     public void setUserpass( String formPass ) {
          pass_code = formPass;
      }


      public String getUserpass() {
          return pass_code;
      }

     }

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to