• Post Reply Bookmark Topic Watch Topic
  • New Topic

Web Container things for Servlet and JSP  RSS feed

 
Gil Li
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello people...
I have a doubt in web container design.When we use JSP ,that page
will be converted into servlet and executed.The web container executes the updated JSP without restarting web container.But when we use servlet most of the web containers need to be restarted(Eg : Apache Tomcat),Some servlet provieds indirect reloading operations (Eg : Blazix provides URL to update servlet class). what may be the resons that they cant provide automatic class updation while they provide for JSP(which will be converted in to servlets).Please let me know the things happening here. Thanks in advance.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"GILLI",

unfortunately your display name does not comply to our rules here at the JavaRanch. We're pretty light on rules, but this is one we take seriously.

We require your display name to be two words: your first name, a space, then your last name. You can edit your display name here.

thanks,
Dave.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also see the same behaviour in application servers (or containers) that allow you to hot deploy or hot swap applications. eg you can have an entire web application running, then stop it, update it and restart it without restarting the server.

The trick is that if you make sure a group of classes get loaded by a separate ClassLoader instance (which you control), you can 'unload' and refresh those classes by throing the ClassLoader away and creating a new one! There is quite a bit more to it than that, but that's the basic concept.

Dave.
 
Gil Li
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai david..

I am just entry level to JSP and servlet.I could not understand the things what you told regarding class loaders.Can you please explain me in a simple way....?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid that your newly chosen name of "GIL, ,LI" doesn't cut the mustard either. "Gil Li" would work nicely. Please change the display name to conform to the policy. Thanks.

As to your question, each web container handles this differently. Tomcat, for example has settings you can fiddle with on each context to control whether it will detect when something has changed and automatically reload the context. Monitoring this and reloading is an expensive operation so it's not "on" by default.
[ June 02, 2004: Message edited by: Bear Bibeault ]
 
Gil Li
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou Bibeault ....Hope this name matches with your rules....
Your site doing excellent job for Java aspirants....Best wishes and keep it up...
[ June 03, 2004: Message edited by: Gil Li ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!