Anand Alagappa wrote:
>
> Hi All
>
> I wrote a simple jsp page which uses a bean to
> process the form details. In the form you type the
> name and when you hit the submit button, it should
> reply back as Hello, ......(name).
>
> I imported the class in the jsp page as
>
> <%@ page import = "hello.NameHandler" %>
> NameHandler is my bean.
>
> In the bean I have methods calles setUsername() and
> getUsername(). The getUsername returns the value of
> the name entered in the textbox.
>
> So I coded in the .jsp page as
>
> <jsp:useBean id="myBean" scope="page"
> class="hello.NameHandler" />
> <jsp:setProperty name="myBean" property="name" />
>
> <br>............<br>
>
> Hello <jsp:getProperty name="myBean"
> property="Username" />
>
> The problem is its importing class but not
> recoginising jsp tags. Its not giving me any error.
> I tried the scope= request also but it didn't work.
> Can any body help me...
Since you don't get a specific error message, there may be other problems,
but one thing you definitely need to change is the property name. Since
your getter method is getUsername(), the corresponding property name is
username, i.e. it starts with a lower case u. This is all defined by the
JavaBeans specification. See also another mail I sent earlier today about
the same issue (Subject: Re: Sub: Set Property).
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
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