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 |
What is cookie in servlet?
can u give some realtime example in ploymorphism? and inheritance?
Write a program to show the functionality of doget and dopost method?
What is servlet exception?
6 Answers EDS, Spa IT Solutions,
how can we create object to a class in a jsp file?
5 Answers Accenture, L&T, TCS,
Can we use the constructor, instead of init(), to initialize servlet?
What are the advantages of cookies?
What do you mean by cgi and what are its drawbacks?
please give url to get orinal software for I-net crystal clear java report tools?
What’s the difference between sendredirect and forward methods
What's the difference between authentication and authorization?
How is an application exception handling is done using a servlet?