Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Doubt?  RSS feed

 
Ranch Hand
Posts: 10128
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??
 
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: 10128
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???
 
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: 10128
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??
 
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: 10128
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??
 
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.
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!