Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Translation Unit....

 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you explain about translation unit in jsp pages?
thanks
daniel
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Translation Unit is a set of pages that will be translated into a single servlet.
So... when you use a static include (<%@ include file="blah.jsp" %> -- that page is combined with the initial page at translation time - and is compiled into a single servlet.
When you use a dynamic include (<jsp:include page="blah.jsp" %> -- the OUTPUT of that page is combined with the initial page at request time -- and are two seperate servlets.
* the PageContext scope makes variables available for that particular translation unit.
* You can't define the same variable more than once in a single transaltion unit.
* You can't define the same bean <jsp:useBean> more than once in a single translation unit.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic