Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp-use bean

 
Duray Rajesh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I having bundle of classes as JAR Files,
how can i retrieve any class from that jar, using use bean tag in jsp.
Is it possible to retrieve or not
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duray,
Welcome to JavaRanch!

What do you mean by "retrieve". If you mean instantiate, you create the class just like you would any other. Just make sure the jar file is in your classpath.
 
Duray Rajesh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
can u give me an example for it.
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all you need to place your jar in server classpath, e.g., in application lib folder.

Second in JSP, you need to import that class by...



Now you can use your class in your jsp by any jsp elements including custom tags.


Regards


Naseem
[ June 16, 2006: Message edited by: Naseem Khan ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the JSP forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic