• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jsp doubt

 
Marcos Urata
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a jsp becomes a servlet, and everytime you (the developer) change your jsp code a new servlet representing that .jsp will be created (replacing an existing one), how come it is not necessary to restart the container??
 
Colin Fletcher
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would be necessary to re-deploy the application. This could be accomplished by copying the war file to the webapp folder and 'telling the container to restart the webapp' or restarting the container.
 
Marcos Urata
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No! It is not necessary (At least with tomcat)! That�s the point of my question. Why it is not necessary to redeploy the application (or just the *.jsp that were altered) if they will become a servlet??

Try it out!!
 
Saket Barve
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marcos,

The container will look if there have been any changes in the JSP file being called. If such is indeed the case, the JSP page will be compiled all over again to form a new servlet and so on.

In my experience, Tomcat does not always take the latest JSP files so sooner or later, you'll perhaps want to restart anyway when making crucial changes. Often times I also delete the contents of work and logs directories to ascertain the needful.

Regards,
Saket
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic