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 |
How can the session in servlet can be destroyed?
What is http servlet in java?
What’s the difference between sendredirect and forward methods
How do you pass the data from one servlet to another servlet?
In servlets, Why do we need both GET and POST method implementations?
What is the difference between Difference between doGet() and doPost()?
What are the classes and interfaces for servlets?
How to generate the server side programming and the advantages of it over the other languages?
How to pass a requrest object of one servlet as a request object to another servlet?
How do you load an image in a Servlet?
hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code
What is webservlet?