Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

JSP Translation Phase

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I had this question in my mind for a long time and I was trying to find out the answer, since I couldn't get a clear answer yet, let me ask you..

We all know that the JSP will not be translated to Servlet for each request; whenever there is a change(modification) in JSP page, to reflect that change the JSP engine re-creates the Servlet.

The question:
How JSP Engine understand there is a change(modification) in the JSP file?

Is there any comparison or cross-check happening between the JSP and its Servlet?

If yes will it happen on each requst?, so how fast it is, when there is, say, 1000 lines of script code in JSP?


Thanks in advance..

Ratheesh
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The container checks for the Time-stamp of the JSP.If it is more recent that its generated servlet, then it recompiles the jsp into servlet and hence the changes appear.That is why when you make even slight change in a jsp,the page takes time to load.
 
Ratheesh Narayanan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Raghu,

And I found that most JSP containers support configuring how often the container checks JSP file timestamps to see if the page has changed.
So we can put a short intervel of seconds or minutes in a development environment and long intervel(may be never) on a production environment.

That was a great and very helpful answer you gave.. Thanks a lot..

Ratheesh
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic