Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAR file of bean

 
R K Singh
Ranch Hand
Posts: 5384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
R K Singh
Ranch Hand
Posts: 5384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Carl
but there was one more problem but now it has been solved here
thanks to every one .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic