>From [EMAIL PROTECTED]  Fri May 19 
>05:36:53 2000
Received: from scam.xcf.berkeley.edu (scam.XCF.Berkeley.EDU [128.32.43.201]) by 
lgs-systems.com (8.8.5) id FAA17389; Fri, 19 May 2000 05:36:52 -0600 (MDT)
Received: (qmail 83551 invoked by alias); 19 May 2000 11:17:36 -0000
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 83485 invoked from network); 19 May 2000 11:17:29 -0000
Received: from unknown (HELO himalaya.npi.stpn.soft.net) ([EMAIL PROTECTED])
  by scam.xcf.berkeley.edu with SMTP; 19 May 2000 11:17:29 -0000
Received: from npi.stpn.soft.net ([192.9.202.212])
          by himalaya.npi.stpn.soft.net (8.9.3/8.8.4) with ESMTP
          id QAA11759; Fri, 19 May 2000 16:39:20 +0530
Message-ID: <[EMAIL PROTECTED]>
Date: Fri, 19 May 2000 16:45:33 +0530
From: Khem Chand Sachdeva <[EMAIL PROTECTED]>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>,
        JSP Mailing List <[EMAIL PROTECTED]>
Subject: basic problem
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-UIDL: 41a52d340da9058dd30b8902fa0ffe23

Hi All
i am new to JSP programming
could somebody tell me what is the problem with the above code.
when the jsp is called first time it should display login page
and then
after that it should disllay welcom <username>
it is throwing following exception
_____________________________________________________________
Unhandled error! You might want to consider having an error page
to
report such
errors more gracefully
com.sun.jsp.JspException: getProperty(try): cant find method to
read {1}

        at

com.sun.jsp.compiler.GetPropertyGenerator.generate(GetPropertyGenerat
or.java:84)
        at

com.sun.jsp.compiler.Jsp1_0ParseEventListener$GeneratorWrapper.genera
te(Jsp1_0ParseEventListener.java:675)
        at

com.sun.jsp.compiler.Jsp1_0ParseEventListener.generateAll(Jsp1_0Parse
EventListener.java:143)
        at

com.sun.jsp.compiler.Jsp1_0ParseEventListener.endPageProcessing(Jsp1_
0ParseEventListener.java:114)
        at com.sun.jsp.compiler.Main.compile(Main.java:284)
        at
com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:135)
        at

com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspS
ervlet.java:77)
        at

com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.j
ava:87)
        at

com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
        at
com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at

com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155
)
        at
com.sun.web.core.Context.handleRequest(Context.java:414)
        at

com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
________________________________________________________________

the bean and jsp code are attached with the document
thanx,

_________

JSP File
_________



<!--
  Number Guess Game
  Written by Jason Hunter <[EMAIL PROTECTED]>, CTO, K&A Software
  Copyright 1999, K&A Software, distributed by Sun with permission
-->

<%@ page import = "TryBean" %>

<jsp:useBean id="try" class="TryBean" scope="session"/>
<jsp:setProperty name="try" property="*"/>

<html>
<head><title>Number Guess Game</title></head>
<body bgcolor="white">
<font size=4>

<% if (try.getStatus()) { %>

<form action="">
Enter your username and password
UserName :<input type="text" name="username">
Password :<input type="text" name="password">

<% } else  { %>

  Welcome to the Number Guess game.<p>
  Your username <jsp:getProperty name="username" name="try"/>
  Your Passowrd <jsp:getProperty name="password" name="try"/>



<% }  %>
</body>
</html>

_________

Bean File
_________
public class TryBean
{
 public String username;
 public String password;
 public boolean firstTime=true;
 TryBean()
 {
  username="";
  password="";
 }
 public void setUsername(String username)
 {
  this.username=username;
  firstTime=false;
 }
 public void setPassword(String password)
 {
  this.password=password;
  firstTime=false;
 }
 public String getPassword()
 {
  return password;
 }
 public String getUsername()
 {
  return username;
 }
 public boolean getStatus()
 {
  return firstTime;
 }
}



---
To unsubscribe, mail [EMAIL PROTECTED]
To get help, mail [EMAIL PROTECTED]

===========================================================================
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