how can we create object to a class in a jsp file?
Answers were Sorted based on User's Feedback
Answer / samuel.j
use the page import tag to import ur class and execute
methods of the class
< % @ page import = packageName.Classname %>
<%
ImportedClass object = new ImportedClass();
object.executeMethods();
%>
Please check for some documentation as to including XSLT in
JSP
| Is This Answer Correct ? | 60 Yes | 24 No |
Answer / upender
you can create with help of useBean tag also.
<jsp:useBean id="beanId' class="packagename.ClassName" />
| Is This Answer Correct ? | 30 Yes | 15 No |
Answer / 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 |
Explain the servlet context.
How to pass session values from one servlet container to another servlet container? or how can we get session values of one container in another container?
What is the capacity that doGet method can send to the server?
How many ways to remove the session object in the container
How can the session in servlet can be destroyed?
Explain the servlet filter.
What happens, if server sends a cookie to a browser that doesn't supports cookies?
What is the inter-servlet communication?
How do you define a servlet?
Explain servlet events?
What do you mean by httpservlet?
Explain the methods in Generic and HTTP Servlets?