how can we create object to a class in a jsp file?

Answer Posted / shane rajasinghe

Creating The Object
<% MyBean student=new MyBean(); %>
*************************************************
calling attributes in the created object
<jsp:getStudentInfo name="student" property="name"/>
<jsp:getStudentInfo name="student" property="dit"/>
*****************************************************

Is This Answer Correct ?    7 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?

868


What is the use of send redirect () method?

667


Differentiate between get and post?

765


What is meant by Servlet? What are the parameters of service method?

686


Which HTTP method is non-idempotent?

710






Is it possible to have a constructor inside the servlet?

634


How we can call a jsp from the servlet?

619


What is the use of attribute in servlets?

622


What is a deployment descriptor?

691


What is servletconfig?

637


When to use doget() and when dopost()?

719


List out difference between a JavaBean from a Servlet?

642


Can we refresh servlet in client and server side automatically?

661


What are common tasks performed by Servlet Container?

848


Why servlet is faster than jsp?

645