File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JAR file of bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "JAR file of bean" Watch "JAR file of bean" New topic
Author

JAR file of bean

R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5369
I have Apache Tomcat 4.0. and still newbie to Servlet/Jsp.
I tried to make .jar file of one bean and put that jar file in classes dir but it is not working.
When I put normal class file with package dir structure in classes dir then it works fine.
I tried to create 'lib' dir in WEB-INF folder and put JAR files there but still it is not working.
I tried to search for "bean" but could not scuuceed in getting my answer
My question is "Is there any way by we can make JAR file of bean and use it?"
I did not use manifest file to create JAR.
Second question is this:
If answer is "yes" for first question then where(in which dir) one should deploy it? Does one has to make changes in any xml file?
I hope that question is clear.


"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
The answer to question 1 is "Yes"
2) under the WEB-INF/lib directory.
Some gotchas, you have to restart the server after adding a new jar to lib directory. Ensure your bean is in a package. A bug with JSP will not find a class without a package associated with it.
Oh and beans do not get declared anywhere in the we.xml file.
[ April 16, 2002: Message edited by: Carl Trusiak ]

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5369
Thanks a lot Carl
but there was one more problem but now it has been solved here
thanks to every one .
 
 
subject: JAR file of bean
 
Threads others viewed
Running a RMI Application
basic ejb problem
Is it mandatory to put a bean inside a package?
Jar files
JNI and Jar
developer file tools