tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luís de Sousa <luis.a.de.so...@gmail.com>
Subject Re: Tomcat can't find Java Beans
Date Thu, 06 May 2010 14:19:16 GMT
On Thu, May 6, 2010 at 3:14 PM, Pid <pid@pidster.com> wrote:
>>
>> org.apache.jasper.JasperException: /greeter.jsp(5,10) The value for
>
> Now the contents of the greeter.JSP, please?
>

Hi again, that was in the link:

http://www.roseindia.net/ejb/introduction/javabean.shtml

///////////////////////////////////////////////////////////////////////////////////
///// greeterbean.java

package ourbeans;

public  class greeterbean

{

    public greeterbean()   {    }

    public String  greetme(String s)

    {

    return   "How are you?...."+s;

    }

}

///////////////////////////////////////////////////////////////////////////////////
///// greeter.htm

<html>

                <body>

                               <form    method=post    action=greeter.jsp>

                               <input   type=text      name='text1'>

                               <input   type=submit>

                                </form>

                 </body>

                 </html>

///////////////////////////////////////////////////////////////////////////////////
///// greeter.jsp

<html>

                 <body>

          <jsp:useBean   id="greeter1"  class="ourbeans.greeterbean"    />

                              <%

                                     String   s =
request.getParameter("text1");

                                     String   a = greeter1.greetme(s);

                                     out.println(a);

                               %>

                  </body>

                 </html>

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

Thanks,

Luís

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message