Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

compilation difference between servlets and JSp  RSS feed

 
Ritu varada
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been working on servlets and JSp's for some time but cannot remember the difference. When you recompile a servlet, you need to restart the server for it to take effect. If I add the same line in the JSp, I don't need to. My question is how does the compilation differs from a servlet to jsp when in fact in the end, a jsp is compiled into a servlet ?

Hopefully, its not such a lame question. Thanks.
 
Eugene Lucash
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jsp pages are first translated to java servlet source code and then compiled to java class. The difference is that jsp container(on top of servlet container) tracking changes to jsp file and recompiles and deploys it as servlet automatically. When you adding a plain servlet, you must write servlet config and mapping in web.xml, so changes takes effect when webapp is reloaded (you can reload server too, but it is not nessesary)

Read some book on servlet/jsp
[ February 22, 2005: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!