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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we have servlet wrapper classes?

582


Can a jsp be called using a servlet?

586


Explain the jar and war files in servlet?

557


What is java servlet?

614


What do you mean by web applications?

631






What is session?

643


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?

782


How do you invoke a servelt?

630


Is servlet a controller?

577


What is a servlet-to-servlet communcation?

652


What is servlet and its life cycle?

573


What is the element?

590


What's the difference between servlets and applets?

565


Difference between forward() method and sendredirect() method ?

588


What is URL Encoding?

627