• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tag files

 
Amruth Puppala
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tag file

<%� WEB-INF/tags/myExample3.tag �%>
<%@ variable name-given="myVar" scope="AT_BEGIN" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="myVar" value="3"/>
After: ${myVar}
<jsp oBody/>


jsp file
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sampleTag" tagdir="/WEB-INF/tags" %>
<c:set var="myVar" value="1"/>
Before: ${myVar} <br>
<simpleTag:myExample3/>


can some one tell me the output
[ August 21, 2008: Message edited by: Chintu sirivennela ]
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before: 1
After: 3
 
Rufus Addis
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll probably only get:

Before: 1

As there is a mismatch between the sampleTag of the taglib directive and the simpleTag prefix used further down.

What did you think the output should be? What was it when you tested the code snippets?

Rufus
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic