• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we jar the servlets and still use them

 
vishal goyal
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is it possible to put all the servlets in a jar file and then access them for throwing response to the client. If yes, how? If no, why not? Please let me know the details.
Thanks and Regards,
vishal.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sun's recommended deployment scheme for servlets is a "war" - or "Web ARchive" file - which is simply a jar with the file extension changed to "war". Once it's on the server, some servers may unpack the jar, but that's really just an internal quirl of the server.
Within the WAR file, the servlets classes are placed in the WEB-INF/classes directory. If they were already in a jar, the jar would be placed in the WEB-INF/lib directory.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic