Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Doubt?

 
Joe Harry
Ranch Hand
Posts: 10085
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I have a jsp page which gets translated to a servlet on either first client request or container startup. Now After if got compiled, I make some changes to the jsp and when I try to access the jsp again will I have to restart the container??

Another doubt is that in a jsp page, how can I get a hold of the jsp implicit objects in the methods I write using jsp declarations??
 
kesavaraj vazanth
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For JSP page changes restarting the container is not required i think.
 
Joe Harry
Ranch Hand
Posts: 10085
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what happens if I make changes to say scriptlets???
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The page will be recompiled. I think that the container looks at the timestamp of the file, so any changes in it will force the page to be recompiled.
 
Joe Harry
Ranch Hand
Posts: 10085
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satou,

Why is this behavior only for jsp pages?? Why not for servlets??
 
Priya Viswam
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another doubt is that in a jsp page, how can I get a hold of the jsp implicit objects in the methods I write using jsp declarations??


implicit objects are not available in the methods that you write using jsp declarations.
 
Joe Harry
Ranch Hand
Posts: 10085
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we make it available by any means??
 
Sergio Tridente
Ranch Hand
Posts: 329
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can. By calling getServletContext(), getServletConfig(), etc. I also believe that EL implicit objects are always available, so you can you those instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic