Kris Schneider wrote the following on 10/21/2004 12:36 AM:
You're sure there's not a newline at the very end of your tag file?
I've even done a reg expression search and replace for \n and nothing
found. It's just one line. I'm calling it from javascript like:
span style=cursor:hand;
Rick,
Here'a a bogus example:
dummy.jsp:
--
%@ page contentType=text/plain %
%@ taglib prefix=tags tagdir=/WEB-INF/tags %
Tag output: 'tags:dummy/'
dummy.tag:
--
%@ tag body-content=scriptless %%--
--%%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %%--
--%c:out
Kris Schneider wrote the following on 10/21/2004 7:33 AM:
Here'a a bogus example:
dummy.jsp:
--
%@ page contentType=text/plain %
%@ taglib prefix=tags tagdir=/WEB-INF/tags %
Tag output: 'tags:dummy/'
dummy.tag:
--
%@ tag body-content=scriptless %%--
--%%@ taglib prefix=c
Nope (I tried it - it looks like your choice A), but your example really isn't
any different than mine ;-). The ' is after the tag and it's still on the same
line as the tag's output. Care to (re)post the tag file that's giving you the
problem?
Quoting Rick Reumann [EMAIL PROTECTED]:
Kris
Kris Schneider wrote the following on 10/21/2004 2:59 PM:
Nope (I tried it - it looks like your choice A), but your example really isn't
any different than mine ;-). The ' is after the tag and it's still on the same
line as the tag's output. Care to (re)post the tag file that's giving you the
Kris Schneider wrote the following on 10/21/2004 4:16 PM:
Right, got it. The problem is in the DelimItems.tag file.
I'm still confused:) Here's the DelimItems tag file:
(had this all one line but broker out the imports as shown)
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core;
%%@
Hopefully the formatting's okay:
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %%--
--%%@ attribute name=items
required=true
type=java.util.Collection %%--
--%%@ attribute name=preDelim %%--
--%%@ attribute name=postDelim
It still causes the same problem. The problem is in the break 'after'
the whole tag is used. The break on the JSP that calls this tag. To be
sure, I used your exact code below and I still get the same break that
is visible when you view source. To be specific:
When the tag is called in the
So you don't have a blank line after the /c:forEach?
eg you have
[start of file]%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core;
...
( includeLast || !status.last )}'${postDelim}/c:if/c:forEach[end of file]
or do you have
[start of file]%@ taglib prefix=c
Jason Lea wrote the following on 10/21/2004 6:31 PM:
So you don't have a blank line after the /c:forEach?
positive. I triple checked that:)
Perhaps you could try assigning the result to a var
eg
c:set var=${output}tags:DelimItems
items=${associate.additionalServices} property=code postDelim=
This thread has gotten too long to ignore :-)
trimSpaces probably won't do it for you.
As my bit, I tried this trivial JSP:
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %%--
--%tag attr=foo('jsp:include page=test.jsp /')%--
--%anotherTag /
where test.jsp is another trivial JSP as
Not sure what to say at this point 'cause it worked for me with:
%@ page contentType=text/plain %
%@ taglib prefix=curi=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=tags tagdir=/WEB-INF/tags %
jsp:useBean id=fooService class=java.util.HashMap/
c:set target=${fooService} property=code
Kris Schneider wrote the following on 10/21/2004 7:39 PM:
Output (no line breaks):
span style=cursor:hand; onmouseover=return overlib('foo,bar');
onmouseout=return nd();*N/A/span
Now that drives me mad:) If you get a chance, just so I can tell if ends
up being some server or OS situation. If you
First off thanks everyone for being so patient. Somehow I had to have
been an idiot somwhere along the way in creating the Tag file even
though I swear I copied and pasted the code from Kris' initial e-mail
exactly like he had it. Plus I thought I triple checked for any trailing
line break. I
Rick,
Are you still pursuing this? If so, I use the following comment hack:
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %%--
--%%@ attribute name=items required=true
type=java.util.Collection%%--
--%...
I've also seen this in use:
%@ taglib prefix=c
Kris Schneider wrote the following on 10/20/2004 3:51 PM:
Are you still pursuing this? If so, I use the following comment hack:
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %%--
--%%@ attribute name=items required=true
type=java.util.Collection%%--
--%...
I've also seen this in use:
You may be able to work around it via javascript?
Try outputting the value to a hidden text field than displaying the value
property. This will not cause a javascript error elliminates line breaks.
Quoting Rick Reumann [EMAIL PROTECTED]:
Kris Schneider wrote the following on 10/20/2004 3:51
Rick Reumann wrote:
Thanks, yes still looking:( The problem is I'm still left with just one
closing break at the end. I had previously tried converting the whole
tag file to one line and still I'll get one break when it's evaluated in
the JSP.
Sorry, I don't recall the start of this thread,
You're sure there's not a newline at the very end of your tag file?
Rick Reumann wrote:
Kris Schneider wrote the following on 10/20/2004 3:51 PM:
Are you still pursuing this? If so, I use the following comment hack:
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %%--
--%%@ attribute
I created a simple forEach type of delimeter tag that works well for me
(code at end). The problem, though, is I need to use this tag within a
javascript method to produce a string that'll be used in a dhtml popup.
The problem is that, even if I make this tag file all on one line, I
still end
20 matches
Mail list logo