File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes jsp-use bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp-use bean" Watch "jsp-use bean" New topic

jsp-use bean

Duray Rajesh

Joined: Jun 16, 2006
Posts: 12
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

Joined: May 26, 2003
Posts: 33102

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Duray Rajesh

Joined: Jun 16, 2006
Posts: 12
can u give me an example for it.
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
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.


[ June 16, 2006: Message edited by: Naseem Khan ]

Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63841

Moved to the JSP forum.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: jsp-use bean
It's not a secret anymore!