• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Regarding modification of jsp file.

 
Ranch Hand
Posts: 437
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. If we send request(first) to jsp file, container translates it into .java file, compiles, loads the class file, instantiates, initializes, calls the service method and the response will be send to the client. All this happens for first request. If we use <load-on-stratup> all this happens during startup of container except calling service method.

For second request(if we use <load-on-startup> it is first request), container will just calls the service method and serves the client.
Later if any changes made to the jsp file, container detects that, and starts its life cycle again(translating, compiling, etc.).

My question is, how the container knows, there is a change in the jsp file, so i(container) have start the life cycle again? Thankyou.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know the exact algorithm, but I would guess it has a checksum of the JSP file and upon JSP request, it checks the checksum and then either forwards to the class file or retranslates the JSP. Maybe it's even simpler and the container just keeps the creation dates of the JSP files and checks those.
 
Chinmaya Chowdary
Ranch Hand
Posts: 437
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That makes sense. Thankyou.
 
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's going all over the top of my head.. the question n answer!! Phewwww!
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic