el in JSTL / JSP 2.0

2004-07-29 Thread Paul Wallace
Hi,
I am trying to introduce JSP 2 with Tomcat 5 (full source
below), and thus experimenting with the JSTL expression language in JSP
tag files (.tag). I am bemused as to why I cannot embed the expression
language within a JSTL tag thus: 
 
c:forEach begin=${a} end=${b} varStatus=status
 
${status.count} br/
 
/c:forEach
 
Tomcat is really unhappy with this:
 
org.apache.jasper.JasperException: /WEB-INF/tags/wrapper.tag(13,4)
According to TLD or attribute directive in tag file, attribute begin
does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:39)

 
the same code with c:forEach begin=1 end=5 varStatus=status
iterates 5 times with no trouble. I have the latest tld's from Jakarta,
status.count is displaying correctly. 
 
Any thoughts please?
 
Thanks
 
Paul.
 
jsp:
 
%@ taglib prefix=tags tagdir=/WEB-INF/tags %
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %

tags:wrapper a=1 b=10
p Wrapped Content /p
/tags:wrapper
 
.tag:
 
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
%@ tag body-content=scriptless %
%@ attribute name=a required=true %
%@ attribute name=b required=true %

p Attributes - ${a}, ${b} /p
 
c:forEach begin=${a} end=${b} varStatus=status
 
${status.count} br/
 
/c:forEach





Re: maven repository

2004-07-29 Thread mdiggory
Felipe,

I'mon vacation this week so you may not get many responses from me. I'll try 
to be breif.

Quoting Felipe Leme [EMAIL PROTECTED]:

 Hi Mark,
 
 I'd like to upload all taglibs to the repository, but I have some
 questions:
 
 
 On Sat, 2004-02-28 at 12:12, Mark R. Diggory wrote:
 
  1.) create a project directory for taglibs that looks like
  
 
 /www/www.apache.org/dist/java-repository/jakarta-taglibs/jars/standard-
version.jar
 
 /www/www.apache.org/dist/java-repository/jakarta-taglibs/jars/jndi-
version.jar
 
 /www/www.apache.org/dist/java-repository/jakarta-taglibs/jars/tag-lib-
version.jar
 
 
 1.Is /www/www.apache.org/dist/java-repository/ still the right directory
 that is synced to ibiblio? If so, where the taglibs from ibiblio came
 from (as that directory does not have any of our artifacts)?
 

Yes, but, you should do all your work to setup the directory structure in a 
staging area like your home directory before placing anything into these 
directories. Have someone else whose done the process review everything prior 
to moving it into the repository.

 2.Ibiblio already have groups for jstl and taglibs, but they have just a
 few jars. So, we have 2 options:
 
 a.maintain that structure
 b.put everything on jakarta-taglibs, removing these old files from
 ibiblio
 
 I opt for option b - the only problem is that if remove jstl and taglibs
 from ibiblio, it might break other projects that depends on them (I
 would still prefer that option, as those groups are crippled).
 

I don't believe that removing something from java-repository actually removes 
it from ibiblio because of the rsync process. Yes, you should leave whatever 
is on ibiblio there at this time.


  2.) for the last couple releases we should probibly just extract the 
  jars from the tar ball distributions and generate md5's for them.
 
 Ideally, we should 'mavenize' the whole project. But for now, we can
 just generate/upload the MD5 files manually.

thats fine.
 
  3.) finally, a SNAPSHOT symlink and reference file should be generate 
  which points to the latest release for each taglib:
 
 I read in some ASF list that we should not be providing SNAPSHOTs, only
 official releases.
 

SNAPSHOT is different than unofficial release, SNAPSHOT referes to a link to 
the most recent release. an unofficial release is one that has the date as a 
version number, thus there can be SNAPSHOTS that point to official releases in 
the repository.

 
 Once you confirm my questions, I can write some shell scripts to
 populate our repository.
 
 Regards,
 
 Felipe
 
 

Cheers, I'll be around next week if you need help, but I don't suspect I'll 
have time to respond the rest of this week.

-Mark



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



RE: el in JSTL / JSP 2.0

2004-07-29 Thread JD Salzman

I had the same prob. And 2 things I did that worked:

1. try using the 2.4 schema definition in web.xml
2. if the PermittedTablibs.tld is involved make sure your taglib-uri is
http://java.sun.com/jsp/jstl/core

Good luck
 

-Original Message-
From: Paul Wallace [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 28, 2004 11:17 PM
To: [EMAIL PROTECTED]
Subject: el in JSTL / JSP 2.0

Hi,
I am trying to introduce JSP 2 with Tomcat 5 (full source
below), and thus experimenting with the JSTL expression language in JSP
tag files (.tag). I am bemused as to why I cannot embed the expression
language within a JSTL tag thus: 
 
c:forEach begin=${a} end=${b} varStatus=status
 
${status.count} br/
 
/c:forEach
 
Tomcat is really unhappy with this:
 
org.apache.jasper.JasperException: /WEB-INF/tags/wrapper.tag(13,4)
According to TLD or attribute directive in tag file, attribute begin
does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:39)

 
the same code with c:forEach begin=1 end=5 varStatus=status
iterates 5 times with no trouble. I have the latest tld's from Jakarta,
status.count is displaying correctly. 
 
Any thoughts please?
 
Thanks
 
Paul.
 
jsp:
 
%@ taglib prefix=tags tagdir=/WEB-INF/tags %
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %

tags:wrapper a=1 b=10
p Wrapped Content /p
/tags:wrapper
 
.tag:
 
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
%@ tag body-content=scriptless %
%@ attribute name=a required=true %
%@ attribute name=b required=true %

p Attributes - ${a}, ${b} /p
 
c:forEach begin=${a} end=${b} varStatus=status
 
${status.count} br/
 
/c:forEach





Paid jakarta-taglib consulting

2004-07-29 Thread Eric Dahnke

Hello List,


I'm an engineer working on a large Java Struts application. We're doing some
due diligence on the xtags library as it relates to other taglibs. 

We'd like to engage a Senior member of the taglib team to help us with our
overall jsp architecture as it relates to  jakarta-taglibs (html, string,
xtags, sslext, etc) we're using.  We also have one or two xtag
implementation issues.


We're looking to expedite our development process, and are resource short at
the moment. I would anticipate ~ 1 day of work to start, and have plenty of
budget.



Sincerely, Eric Dahnke / Yamaha Music Interactive, Inc. / New York
t : 212 223 6272 / c : 347 524 1992 / f : 212 223 6261 


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



fmt:message and Chinese chars

2004-07-29 Thread Daryl
Hi, 

I've been trying to get a chinese version of a web page going. I switched over to JSTL 
from struts tags a couple of days so I'm still pretty new with JSTL. 

My page works fine if I use the struts bean:message tag, but if I change this to 
fmt:message then it prints out a bunch of garbage charaters. **This only happens with 
the chinese version of my page**, the english version works fine. 

I am using JSTL 1.0 since we are on Tomcat 4, so if this is a bug that has been fixed 
for newer versions then I guess I'll just have to stick with struts tags until we move 
to TC 5. I prefer the JSTL tags though because nesting the message parameters is much 
cleaner. 

Thanks 
Daryl Handley 

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



RE: message and Chinese chars

2004-07-29 Thread Ross, Douglas
Darly,

I am not sure if this is an issue for your case or not but JSTL
independently loads and uses it's own resource bundles NOT the Struts
ones. Because our project needs a special MessagesResourcesFactory, we
cannot use the JSTL fmt lib.

Doug

-Original Message-
From: Daryl [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 6:29 PM
To: [EMAIL PROTECTED]
Subject: fmt:message and Chinese chars

Hi, 

I've been trying to get a chinese version of a web page going. I
switched over to JSTL from struts tags a couple of days so I'm still
pretty new with JSTL. 

My page works fine if I use the struts bean:message tag, but if I change
this to fmt:message then it prints out a bunch of garbage charaters.
**This only happens with the chinese version of my page**, the english
version works fine. 

I am using JSTL 1.0 since we are on Tomcat 4, so if this is a bug that
has been fixed for newer versions then I guess I'll just have to stick
with struts tags until we move to TC 5. I prefer the JSTL tags though
because nesting the message parameters is much cleaner. 

Thanks 
Daryl Handley 

-
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: message and Chinese chars

2004-07-29 Thread Daryl
Doug, 

I think I'm ok there. I have this line in my web.xml (after getting stuck on this 
issue yesterday) 

  context-param
param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name
param-valueApplicationResources/param-value
description/description
  /context-param

It works for the english version (and parts of the chinese resources that are in 
english such as my charset and font which I define in the resource bundle. Some may 
shudder at this, but it works quite well and is super easy). 

Is there something I'm missing ? 


Daryl 


 -Original Message-
 From: Ross, Douglas [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 29, 2004 3:33 PM
 To: Tag Libraries Users List
 Subject: RE: message and Chinese chars
 
 
 Darly,
 
 I am not sure if this is an issue for your case or not but JSTL
 independently loads and uses it's own resource bundles NOT the Struts
 ones. Because our project needs a special MessagesResourcesFactory, we
 cannot use the JSTL fmt lib.
 
 Doug
 
 -Original Message-
 From: Daryl [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 29, 2004 6:29 PM
 To: [EMAIL PROTECTED]
 Subject: fmt:message and Chinese chars
 
 Hi, 
 
 I've been trying to get a chinese version of a web page going. I
 switched over to JSTL from struts tags a couple of days so I'm still
 pretty new with JSTL. 
 
 My page works fine if I use the struts bean:message tag, but 
 if I change
 this to fmt:message then it prints out a bunch of garbage charaters.
 **This only happens with the chinese version of my page**, the english
 version works fine. 
 
 I am using JSTL 1.0 since we are on Tomcat 4, so if this is a bug that
 has been fixed for newer versions then I guess I'll just have to stick
 with struts tags until we move to TC 5. I prefer the JSTL tags though
 because nesting the message parameters is much cleaner. 
 
 Thanks 
 Daryl Handley 
 
 -
 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: el in JSTL / JSP 2.0

2004-07-29 Thread Paul Wallace
 
Hi,
Tbanks for that. I was using the 2.4 schema:

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

And tried (although PermittedTablibs.tld is not in the picture):

taglib
taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri
taglib-location/WEB-INF/tld/c.tld/taglib-location
/taglib

Using this gave me a 500 error (can't find said file). Before edition it
looked something like: 

taglib
taglib-urihttp://java.sun.com/jstl/core/taglib-uri
taglib-location/WEB-INF/tld/c.tld/taglib-location
/taglib

The code hasn't changed (below). Are you suggesting I use that URL in
the JSP / .tag? If so, my IDE cannot resolve the library (IDEA). 

Thanks for your thoughts.

Paul. 




I had the same prob. And 2 things I did that worked:

1. try using the 2.4 schema definition in web.xml
2. if the PermittedTablibs.tld is involved make sure your taglib-uri
is
http://java.sun.com/jsp/jstl/core

Hi,
I am trying to introduce JSP 2 with Tomcat 5 (full source
below), and thus experimenting with the JSTL expression language in JSP
tag files (.tag). I am bemused as to why I cannot embed the expression
language within a JSTL tag thus: 
 
c:forEach begin=${a} end=${b} varStatus=status
 
${status.count} br/
 
/c:forEach
 
Tomcat is really unhappy with this:
 
org.apache.jasper.JasperException: /WEB-INF/tags/wrapper.tag(13,4)
According to TLD or attribute directive in tag file, attribute begin
does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:39)

 
the same code with c:forEach begin=1 end=5 varStatus=status
iterates 5 times with no trouble. I have the latest tld's from Jakarta,
status.count is displaying correctly. 
 
Any thoughts please?
 
Thanks
 
Paul.
 
jsp:
 
%@ taglib prefix=tags tagdir=/WEB-INF/tags %
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %

tags:wrapper a=1 b=10
p Wrapped Content /p
/tags:wrapper
 
.tag:
 
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
%@ tag body-content=scriptless %
%@ attribute name=a required=true %
%@ attribute name=b required=true %

p Attributes - ${a}, ${b} /p
 
c:forEach begin=${a} end=${b} varStatus=status
 
${status.count} br/
 
/c:forEach






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



RE: el in JSTL / JSP 2.0

2004-07-29 Thread Paul Wallace

Hi, 

It took me a while to get IJ/Jboss3.2.5(tomcat5)/JDK1.5 working but the
above finally rendered jstl 1.1 ${2+2} without using c:out
value=${2+2}/ 

That is what I am trying to do, embed some el in my JSTL (two
int attributes passed into my tag, and the tag then iterates for the
defined number). It works with static nos, but does not accept the el
(${status.count} is fine):

c:forEach begin=${a} end=${b} varStatus=status
${status.count} br/
/c:forEach 

Where static values are fine: c:forEach begin=1 end=5
varStatus=status 

I made mods as per your email (source included at the foot). Idea 4.5
now is happy with %@ taglib uri=http://java.sun.com/jsp/jstl/core;
prefix=c % in my JSPs (mysterious), but I am still getting the same
message. Here's the 3 source files again.

Thanks again for your help

Paul.

web.xml:

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

jsp-config
taglib
taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri
taglib-location/WEB-INF/tld/c.tld/taglib-location
/taglib
/jsp-config
.

JSP: 

%@ taglib prefix=tags tagdir=/WEB-INF/tags %
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %

tags:wrapper a=1 b=10
p Wrapped Content /p
/tags:wrapper

wrapper.tag:

%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
%@ tag body-content=scriptless %
%@ attribute name=a required=true %
%@ attribute name=b required=true %

c:forEach begin=${a} end=${b} varStatus=status
${status.count} br/
/c:forEach

Message (same):

org.apache.jasper.JasperException: /WEB-INF/tags/wrapper.tag(15,4)
According to TLD or attribute directive in tag file, attribute begin
does not accept any expressions

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:39) 




IDEA 4.5 will not complain about the 2.4 schema spec of web.xml however
note
jars in web-inf/lib will be default added to library. 

Try web.xml:

?xml version=1.0 encoding=ISO-8859-1?

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  version=2.4 (as you have)

  jsp-config  (new 2.4 xml tag) 

taglib
taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri
taglib-location/WEB-INF/tld/c.tld/taglib-location (make sure
this path is correct)
/taglib

  /jsp-config

/web-app

Then in jsp:
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c % (must be
same
as in web.xml, technically can be anything unless permittedTags
involved)

Start simple w/ EL: ${2+2}


With IDEA 4.5 you should get green bars for both the web.xml and the jsp
file (the c.tld is all red, but no matter as tomcat 5 will still work)
when
the taglib-uri paths match.

As part of the jsp 2.0 spec, taglib is optional in jsp's as the
container
knows of them by default. 

It took me a while to get IJ/Jboss3.2.5(tomcat5)/JDK1.5 working but the
above finally rendered jstl 1.1 ${2+2} without using c:out
value=${2+2}/

Sound like you are almost there...


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



Re: maven repository

2004-07-29 Thread Felipe Leme
On Thu, 2004-07-29 at 10:30, [EMAIL PROTECTED] wrote:

 Yes, but, you should do all your work to setup the directory structure in a 
 staging area like your home directory before placing anything into these 

Done:

http://apache.org/~felipeal/maven_repo/

 directories. Have someone else whose done the process review everything prior 
 to moving it into the repository.

Could you please take a quick look on that directory? I will also ask on
the maven-dev list...

 I don't believe that removing something from java-repository actually removes 
 it from ibiblio because of the rsync process. Yes, you should leave whatever 
 is on ibiblio there at this time.

Ok, I will leave it there (although I don't like redundant stuff)

 SNAPSHOT is different than unofficial release, SNAPSHOT referes to a link to 
 the most recent release. an unofficial release is one that has the date as a 
 version number, thus there can be SNAPSHOTS that point to official releases in 
 the repository.

I thought a SNAPSHOT always pointed to the latest unofficial release (in
fact, Maven lacks the concept of CURRENT, which would be a link to the
last official release).

Anyway, we can pass on the SNAPSHOT concept, as the taglibs are not
released that often.

 Cheers, I'll be around next week if you need help, but I don't suspect I'll 
 have time to respond the rest of this week.

Hopefully you can still check that repo this week :-)


Thanks again for helping it out,

Felipe



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