Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

mock 5 - 78% score - experiences  RSS feed

 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. remember that in case of any directive , say for e.g -
<%@ page....%> is OR, but <%@page....%> is OK, but
<% @ page....%> is NOT OK. not the illegal space !

2. The EL code within the body of the tag may refer to the iteration variable
but scripting code cannot.



so the above thing mentioned in the mock engine is incorrect !

3. the forEach tag has a attibute called "varStatus". as said in hfsj, its
of type LoopTagStatus. I just checked the api for this class, and was
amazed to see all the method that it has. A sample code is -

<c:forEach var="i" begin="10" end="30" step="5" varStatus="status">
<c:if test="${status.first}">
begin:<c ut value="${status.begin}"/>
end:<c ut value="${status.end}"/>
step:<c ut value="${status.step}"/>
</c:if>
</c:forEach>


the variable "Status" is of type LoopTagStatus, so, the EL expressions
are like calling the methods - isFirst( ), getEnd( ), getBegin( ) and
getStep( ) of the TagSupport class. Hope this adds to the understanding
of the fellow ranchers.

4. this one is really a good catch -
when you use a for loop inside a jsp:scriptlet, not that you are in a
XML character area , which means -
for(int i = 0; i <= 5; i++ ) should be written as -
for(int i=0; i&lt;5; i++) inside a scriptlet.
this is because that the character < is taken as a starting syantag
for a XML tag ! hope i am correct !

thats all, remaining things where i went wrong were some very weird and SPECY questions on custom tags, i read the explanation but not posting it here !

hope this adds to the knowledge of ranchers !
thanks
 
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!