• Post Reply Bookmark Topic Watch Topic
  • New Topic

include tag in middle of page  RSS feed

 
ben oliver
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one JSP, in the middle of it, it includes few other JSPs. Some included JSP has their own tag lib include lines like

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

Usually people prefer to have these line put in the beginning of JSP. But in my case, they appear in the middle of JSP because they are brought by the included JSP. It seems to work fine. I am just wondering if it could be any potential problem since the compiler would not get this line until it reaches the middle ?
 
Kris Schneider
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should get a translation error if you try to use the taglib prefix before the directive appears in the page. So, as long as you don't do that, you should be fine...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!