Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets in JAR files

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you take all your servlets, JAR them up, put them in the WEB-INF/lib folder, and they still be accessible? Can you use them just like they were in the classes folder?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can do that.
The /WEB-INF/lib/*.jar area for Java ARchive files. These files contain
servlets, beans, and other utility classes useful to the web application. The web
application class loader must be able to load classes from any of these archive
files.
The web application classloader must load classes from the WEB-INF/ classes
directory first, and then from library JARs in the WEB-INF/lib directory.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! Now, is there any reason why we should NOT do this?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont see reasons why we should not. :roll:
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
Joe Pluta
Ranch Hand
Posts: 1376
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg, in my next release of my product, I plan to JAR all my servlets.
Joe
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Joe Pluta:
Greg, in my next release of my product, I plan to JAR all my servlets.
Joe

What product is that Joe?
BTW - I am anxiously awaiting an Eclipse Step By Step Volume 2.
 
Joe Pluta
Ranch Hand
Posts: 1376
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I sell a product that uses JSP Model II to web enable green-screen applications (you know, those clunky 24x80 text-only applications?). The IBM iSeries is perhaps the most powerful business machine made, for a whole host of reasons, but it is severely lacking in the UI department. So I developed a middleware platform that actually goes in and analyzes your programs, makes source changes to connect them to a servlet, then displays the data in a JSP.
There are shops that have been running this stuff in production for over a year, and I'm getting ready for a new release that will eventually support portlets and web services as well as JSPs. It's pretty exciting stuff .
Joe
P.S. Eclipse Step by Step is not getting anywhere near the action it did in its first month. I'm not sure why, except that we missed the major momentum of June and July (don't make me go there ). I'm still trying to decide whether a followup book will have a market.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Joe Pluta:
I sell a product that uses JSP Model II to web enable green-screen applications (you know, those clunky 24x80 text-only applications?). The IBM iSeries is perhaps the most powerful business machine made, for a whole host of reasons, but it is severely lacking in the UI department. So I developed a middleware platform that actually goes in and analyzes your programs, makes source changes to connect them to a servlet, then displays the data in a JSP.
There are shops that have been running this stuff in production for over a year, and I'm getting ready for a new release that will eventually support portlets and web services as well as JSPs. It's pretty exciting stuff

That sounds pretty cool. Sounds like you found a market. All these people griping about not being able to find jobs or the IT market being dead, it makes me laugh. We are in an age where you have to make jobs for yourself. And that means, if you are a programmer, finding a market and the need for something which usually means you come up with a custom solution for someone that ends up having a need in more than one place. When are people going to realize that we have enough Word Processors and Email Clients and start using their brains for something a little more recolutionary.
I am working on a similar task in the sense that I found a need for something that doesn't really exist. Although, the idea behind the app is nothing new or breakthrough.
That sucks about your book. I try and mention it when I can when replying to eclipse questions. Don't take this the wrong way, but I wonder if you dropped the price down a bit, if it would do better? I know your publisher probably set the price and I am not saying it is not worth the $$, but....
 
Joe Pluta
Ranch Hand
Posts: 1376
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're probably right, Gregg. I have no idea how all of this works, but I bet lowering the price would help. I'll mention it to the powers that be.
Joe
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic