Re: , onclick and

2004-11-15 Thread Ben Anderson
see these pages...

struts-el
http://struts.apache.org/faqs/struts-el.html

jstl
http://java.sun.com/products/jsp/jstl/

a popular open source jstl implementation (the basis of this list)
http://jakarta.apache.org/taglibs/


On Thu, 11 Nov 2004 12:57:57 -0800, Cook, Lori A <[EMAIL PROTECTED]> wrote:
> Sigh. I was afraid that would be the case.
> 
> Following your example another way is:
>   
> var deleteMsg = '<bean:message key="delete.msg" />';
>   
>onclick="confirm(deleteMsg);"/>
> 
> I am unfamiliar with  and . Are these part of standard
> jsp and Struts (to which I am constrained)? A Google search was not
> illuminating for either tag.
> 
> Thank-you for the help. It stopped me from wasting any more time on
> impossible markup. And now I can internalize why it doesn't work.
> 
> Lori <*>
> 
> 
> 
> -Original Message-
> From: Ben Anderson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 11, 2004 11:00 AM
> To: Tag Libraries Users List
> Subject: Re: , onclick and 
> 
> alright, I flubbed you up yesterday.  That's what I get for trying to
> give advice even though I haven't used the framework much recently.
> But this one I'll get right...
> You can't define an xml element as an attribute of another element.
> This is an xml rule - nothing specific to struts or whatever other
> taglibs you are using.  Now this is where the el can come in handy:
> 
>   src="normal.gif" border="0" alt=""
> onclick="confirm('${delete}');"/>
> 
> hth,
> Ben
> 
> On Thu, 11 Nov 2004 10:31:22 -0800, Cook, Lori A <[EMAIL PROTECTED]>
> wrote:
> > Can anyone help with this? I'm using Struts and am having difficulties
> 
> > getting the result of a  into an 'onclick' of an
> >  tag.
> >
> > Here's the markup in the jsp for :
> >   > onclick="confirm('');"/> The (correct)
> > result is:
> >   > onclick="confirm('Delete?');"/>
> >
> > When I change to using  instead of  the result is:
> >   > onclick="confirm('Delete?');"/>
> >
> > As you can see, while the  was retrieved and the
> 'onclick'
> > value correctly created. But the  was not transformed to an
> >  tag.
> >
> > Why not? What am I doing wrong? At some point I'm going to want to
> > retrieve a pointer to a localized graphic and alternate title for the
> >  so the use of  is not specific to 'onclick'.
> >
> > Any help is greatly appreciated.
> >
> > Lori Cook
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> 
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: , onclick and

2004-11-11 Thread Ben Anderson
alright, I flubbed you up yesterday.  That's what I get for trying to
give advice even though I haven't used the framework much recently. 
But this one I'll get right...
You can't define an xml element as an attribute of another element. 
This is an xml rule - nothing specific to struts or whatever other
taglibs you are using.  Now this is where the el can come in handy:




hth, 
Ben

On Thu, 11 Nov 2004 10:31:22 -0800, Cook, Lori A <[EMAIL PROTECTED]> wrote:
> Can anyone help with this? I'm using Struts and am having difficulties
> getting the result of a  into an 'onclick' of an
>  tag.
> 
> Here's the markup in the jsp for :
>  ');"/>
> The (correct) result is:
>  
> 
> When I change to using  instead of  the result is:
>   onclick="confirm('Delete?');"/>
> 
> As you can see, while the  was retrieved and the 'onclick'
> value correctly created. But the  was not transformed to an
>  tag.
> 
> Why not? What am I doing wrong? At some point I'm going to want to
> retrieve a pointer to a localized graphic and alternate title for the
>  so the use of  is not specific to 'onclick'.
> 
> Any help is greatly appreciated.
> 
> Lori Cook
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: x:out error

2004-10-05 Thread Ben Anderson
Thanks for the sanity check.  I got it fixed.  It was a dependency 
issue.  For someone reason I had placed jaxen in one of the 
classloaders.  Not too sure why I did that - but deleting it fixed my 
problem.
-Ben

Hassan Schroeder wrote:
Ben Anderson wrote:
I'm battling what seems to be a pretty elementary problem:

 
    Ben
Anderson



This should work, correct? 

Confirmed that it works on Tomcat 5.0.28 using 2.4 spec/JSTL 1.1 :-)
HTH,

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


x:out error

2004-10-05 Thread Ben Anderson
Hi,
I'm battling what seems to be a pretty elementary problem:

 
    Ben
Anderson



This should work, correct? I've been trying so many variations of this 
and nothing seems to work. I'm on Resin 2.19, but am using jakarta's 
standard taglibs.
Any ideas?
Thanks,
Ben


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


xtags

2004-10-04 Thread Ben Anderson
Hi,
I'm at the beginning stages of writing a client for xml-rpc using jsp tags. 
First I thought I'd use the combination of the xtags and io libraries.  Then, I
realized that jstl supports most xml functionality that I can think of
(transformation/xpath/parsing).  Does this mean that xtags should be
depracated?  Is there any use for it?  Also, I believe I still would need the
io library as the c:import in jstl doesn't support features like including
content in a post request.  Am I on the right track here?
Thanks,
Ben

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



last element in collection

2004-09-22 Thread Ben Anderson
Hi,
Is there a way for me to tell when I'm in the last iteration of a forEach?

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

<%
  myList.add("1");
  myList.add("2");
  myList.add("3");
%>


  
  


I know it'd be better if my logic didn't need to know this, but I'm just
wondering if there's a way to do it.  I thought maybe I could get the size
and stick it in a var like


RE: how to use methods with parameters

2004-02-05 Thread Ben Anderson
Here's a little tester jsp that demonstrates one way to do it:

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



   <%-- this sets the startDate to one year ago --%>
   

startDate: 
endDate: 
<%-- of course it would probably be better to actually perform this 
multiplication
and insert it into the code --%>
calcDate:

-Ben


From: "Just Fun 4 You" <[EMAIL PROTECTED]>
Reply-To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: how to use methods with parameters
Date: Thu, 5 Feb 2004 17:38:14 +0100
Hi,

is it possible to use JSTL for an expression like

<%=calculateDays(startDate, endDate) %> ???

probably not, but I am too new to JSTL to figure it out by myself. Could
someone advise me?
thanks.
Dirk
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
What are the 5 hot job markets for 2004? Click here to find out. 
http://msn.careerbuilder.com/Custom/MSN/CareerAdvice/WPI_WhereWillWeFindJobsIn2004.htm?siteid=CBMSN3006&sc_extcmp=JS_wi08_dec03_hotmail1

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: EL not being evaluated?

2004-02-05 Thread Ben Anderson
el has been incorporated into JSP 2.0 which is what Tomcat 5 implements.  
So, you no longer need the  tag. Just do:

1 + 2 + 3 = ${1+2+3}

Check out Tomcat's default pages to see more cool things you can do with 
Tomcat 5 (JSP 2.0/Servlet2.4).
-Ben

From: "David Wall" <[EMAIL PROTECTED]>
Reply-To: "David Wall" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: EL not being evaluated?
Date: Thu, 5 Feb 2004 09:44:28 -0800
I've installed JDK 1.4.2_03, Tomcat 5.0.18 and Apache's JSTL 1.1 on RH 
Linux
9.

My XHTML JSP contains a simple construct:   1 + 2 + 3 = 
But the expression is not being evaluated, yet the c:out tag is being
processed fine.  The output just looks like:
1 + 2 + 3 = ${1+2+3}

Is there a trick to getting the expressions configured to work with Tomcat
5?
Thanks,
David
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Learn how to choose, serve, and enjoy wine at Wine @ MSN. 
http://wine.msn.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: c:forEach, c:import and variable scope?

2003-12-09 Thread Ben Anderson
How bout this:

   
   
   

some/page.jsp


-Ben

> >
> > [c:forEach var="foo" items="${bars}"]
> >   [c:import url="some/page.jsp"/]
> > [/c:forEach]
> >
> > In this page.jsp I try to access ${foo}, like so:
> > [c:out value="${foo}"/]


From: "Rick Ross" <[EMAIL PROTECTED]>
Reply-To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
Subject: Re: c:forEach, c:import and variable scope?
Date: Tue, 9 Dec 2003 11:27:54 -0800
I don't have my code in front of me, but I am pretty sure that is exactly
what I do for my client.  I don't even recall having to set request scope,
but I'm not positive there.
Tomcat 5.x/JSTL 1.1

R

- Original Message -
From: "Karr, David" <[EMAIL PROTECTED]>
To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 11:21 AM
Subject: RE: c:forEach, c:import and variable scope?
> I can't see how that could work.  The "c:import" operation is processing
> that URL in an external context.  You'd probably have to use
> "jsp:include" for that sort of thing.
>
> > -Original Message-
> > From: otisg [mailto:[EMAIL PROTECTED]
> >
> > Here is the problem (using [] to avoid problems with email
> > clients not handling HTML well).
> >
> > Summary:
> > c:forEach loop, inside it c:import, but the c:import-ed JSP does
> > not see the var from the c:forEach loop.
> >
> > [c:forEach var="foo" items="${bars}"]
> >   [c:import url="some/page.jsp"/]
> > [/c:forEach]
> >
> > In this page.jsp I try to access ${foo}, like so:
> > [c:out value="${foo}"/]
> >
> > No go.  ${foo} seems undefined there :(  page.jsp does not see
> > it.  Scope issue?
> >
> > I then tried adding the following inside that c:forEach:
> > [c:set var="newFoo" value="${foo}" scope="request"/]
> >
> > However, that c:import-ed page.jsp does not see ${newFoo}
> > either. :(
> >
> > I am using jakarta-taglibs 1.0.3 with JBoss/Jetty.
> >
> > Is the above supposed to work?
> > How do I get the import-ed page.jsp to see a variable defined in
> > the page that imported it?
> >
> > Thanks,
> > Otis
> >
> >
> > 
> > Get your own "800" number
> > Voicemail, fax, email, and a lot more
> > http://www.ureach.com/reg/tag
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Shop online for kidsÂ’ toys by age group, price range, and toy category at 
MSN Shopping. No waiting for a clerk to help you! http://shopping.msn.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


well-known URI's

2003-11-28 Thread Ben Anderson
Hello,
I'm not clear on how "well-known" URI's are defined.  The specifications 
don't seem to have much info on this.  I'm wondering if it is possible for 
my own custom tag library to be used without specifying the  in the 
web.xml.
Thanks,
Ben

_
Need a shot of Hank Williams or Patsy Cline?  The classic country stars are 
always singing on MSN Radio Plus.  Try one month free!  
http://join.msn.com/?page=offers/premiumradio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]