Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rule for ending jsp tag

 
Nidhi Juneja
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
A confusion --
I have come across two different ways of ending the jsp tags
<jsp:forward page="msg.jsp"/>
why is it not <jsp:forward page="msg.jsp">
</jsp:forward>
Is there any rule about how to end tags or either way is ok.....
Thanks,
Nidhi
 
Enrico Mannarino
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
if there is nothing bewteen the start and end both are ok, otherwise not.
<jsp:forward page="msg.jsp"/> OK
<jsp:forward page="msg.jsp">
</jsp:forward> OK
<jsp:forward page="msg.jsp">
bla bla bl
</jsp:forward> OK
<jsp:forward page="msg.jsp" bla bla /> NOK
Hope it helps!
/Enrico
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic