Title: Bean is not coming in JSP

Hi All,
I am not able to include bean in my jsp file Here I included my coding Please help
See this is my coding...
File Name: five.asp ( I put this file under JWSrooot/public_html/jsp/ )
<%@ pageinfo="I am new to jsp" %>
<%@ include file=
"banner.html" %>
<%@ page
import = "hello.NameHandler" %>
<jsp:useBean id=
"mybean" scope="session" class="hello.NameHandler" />
<jsp:setProperty name=
"mybean" property="*" />
<HTML>
<HEAD>
<TITLE>JSP</TITLE>
</HEAD>
<BODY>
<form methog=get action=
"five.jsp">
<input type=text name="username">
<input type=submit value=click>
</form>
<%
if(request.getParameter("username")!=null){
<h1>Hello, <jsp:getProperty name=
"mybean" property="username" /></h1>
}
else
<h1> Prem</h1>
%>
</BODY>
</HTML>

File Name: NameHandler.java
package hello;
public class NameHandler {
private String username;
public NameHandler() {
username =
null;
}
public void setUsername( String name ) {
username = name;
}
public String getUsername() {
return username;
}
}

Where I have to out this java class files ?....under classes dir in what format whether I have to make it as jar
Please help....
This problem stucks me a lot in further research in jsp....
thanks
Prem,
Apcosoft

Reply via email to