jsp:usebean

can anyone please say how i can test my first jsp:usebean tag

1>how i will write and where i need to place my bean class

2>in the jsp page how can i use the id.

3>how can i use set property and get property tag

but first i want to just run a bean class . i tried but my jsp page not recognising the bean class . where should i place it in class folder (i m not using package concept here)

[429 byte] By [suryanarayana] at [2007-10-2 21:34:27]
# 1
You can find your Every onaswer on this link.. http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-JSP.html#Section8.1Bye,
Jimmi_S_Prajapatia at 2007-7-14 0:48:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

<jsp:usebean id="bone" class="packone.BeanClass">

if u used above tag bean object will be created and reffered to bone

and if we use scope attribute like this

<jsp:usebean id="bone" class="packone.BeanClass" scope="session">

bean object will be placed in session object

<jsp:setProperty name="bone" property="propOne" value="someValue ">

if u used above tag setters will be called.and value will be setted.

insted of this we can use

<jsp:setProperty name="bone" property="*" >

if we use like this all setgters will be called ..

but if we want to use like above, names of the fields in the form must be same as the properties in the bean

<jsp:getProperty name="bone" property="propName" >

getters in bean will be called .

muralikrishnaa at 2007-7-14 0:48:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...