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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get the actual path of servlet in server?

726


Is it good idea to create servlet constructor?

732


Which are the different ways you can communicate between servlets?

515


What are the drawbacks of cgi?

562


I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>

2524






What is a servlet-to-servlet communcation?

642


Explain jsessionid and when is it created?

591


What are the different session tracking techniques?

670


Explain request dispatcher and its methods.

579


Can you explain in detail 'javax.servlet' package?

543


Can we use the constructor, instead of init(), to initialize servlet?

578


Does servlet have main method?

680


Can we get PrintWriter and ServletOutputStream both in a servlet?

650


How many objects of a servlet is created?

785


Explain the different ways for servlet authentication?

524