Re: Tomcat taglibs 2.0.0 release?

2024-02-06 Thread Jeroen Hoffman
Thanks for the answers guys, very helpful.

Regards, Jeroen

On Mon, Feb 5, 2024 at 5:28 PM Greg Huber  wrote:

> I was testing struts 7 (tomcat 10) and I also use jstl for my 404,403s etc
> (when I have no struts context) ie thrown from web.xml:
>
> 
>403
>/WEB-INF/jsp/errors/403.jsp
> 
>
> Previously on this list it mentioned using the glassfish version.  Think
> glassfish is eclipse?
>
> 
> org.glassfish.web
> jakarta.servlet.jsp.jstl
> 3.0.1
> 
>
> Seemed to work OK.
>
>
>
> On Mon, 5 Feb 2024 at 15:50, Jeroen Hoffman  >
> wrote:
>
> > On Mon, Feb 5, 2024 at 4:05 PM Mark Thomas  wrote:
> >
> > > >
> > > > Are there plans to release the 2.0.0 version?
> > >
> > > No plans.
> > >
> > > Tomcat 10.1.x onwards uses the 1.2.5 taglibs release converted for
> > > Jakarta EE using the Tomcat migration tool.
> > >
> >
> > Thanks for the quick answer!
> >
> > Could you share some details on the migration? In a standard Tomcat 10 I
> > see taglibs-standard-spec-1.2.5-migrated-0.0.1.jar and
> > taglibs-standard-impl-1.2.5-migrated-0.0.1.jar in the examples webapp,
> but
> > these are not published to Maven Central. So can an implementation reuse
> > already converted jars or should it also do a conversion?
> >
> > TIA, Jeroen
> >
>


Re: Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Greg Huber
I was testing struts 7 (tomcat 10) and I also use jstl for my 404,403s etc
(when I have no struts context) ie thrown from web.xml:


   403
   /WEB-INF/jsp/errors/403.jsp


Previously on this list it mentioned using the glassfish version.  Think
glassfish is eclipse?


org.glassfish.web
jakarta.servlet.jsp.jstl
3.0.1


Seemed to work OK.



On Mon, 5 Feb 2024 at 15:50, Jeroen Hoffman 
wrote:

> On Mon, Feb 5, 2024 at 4:05 PM Mark Thomas  wrote:
>
> > >
> > > Are there plans to release the 2.0.0 version?
> >
> > No plans.
> >
> > Tomcat 10.1.x onwards uses the 1.2.5 taglibs release converted for
> > Jakarta EE using the Tomcat migration tool.
> >
>
> Thanks for the quick answer!
>
> Could you share some details on the migration? In a standard Tomcat 10 I
> see taglibs-standard-spec-1.2.5-migrated-0.0.1.jar and
> taglibs-standard-impl-1.2.5-migrated-0.0.1.jar in the examples webapp, but
> these are not published to Maven Central. So can an implementation reuse
> already converted jars or should it also do a conversion?
>
> TIA, Jeroen
>


Re: Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Mark Thomas

On 05/02/2024 15:49, Jeroen Hoffman wrote:

On Mon, Feb 5, 2024 at 4:05 PM Mark Thomas  wrote:



Are there plans to release the 2.0.0 version?


No plans.

Tomcat 10.1.x onwards uses the 1.2.5 taglibs release converted for
Jakarta EE using the Tomcat migration tool.



Thanks for the quick answer!

Could you share some details on the migration? In a standard Tomcat 10 I
see taglibs-standard-spec-1.2.5-migrated-0.0.1.jar and
taglibs-standard-impl-1.2.5-migrated-0.0.1.jar in the examples webapp, but
these are not published to Maven Central. So can an implementation reuse
already converted jars or should it also do a conversion?


We don't have any plans to publish the migrated JARs.

You can re-use those JARs if you wish or migrate them and publish the 
result in your local/company repo.


Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Jeroen Hoffman
On Mon, Feb 5, 2024 at 4:05 PM Mark Thomas  wrote:

> >
> > Are there plans to release the 2.0.0 version?
>
> No plans.
>
> Tomcat 10.1.x onwards uses the 1.2.5 taglibs release converted for
> Jakarta EE using the Tomcat migration tool.
>

Thanks for the quick answer!

Could you share some details on the migration? In a standard Tomcat 10 I
see taglibs-standard-spec-1.2.5-migrated-0.0.1.jar and
taglibs-standard-impl-1.2.5-migrated-0.0.1.jar in the examples webapp, but
these are not published to Maven Central. So can an implementation reuse
already converted jars or should it also do a conversion?

TIA, Jeroen


Re: Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Mark Thomas

On 05/02/2024 14:16, Jeroen Hoffman wrote:

Hi everybody,

I have a question on Tomcat taglibs, I chose this mailing list because 
the taglibs-user one seems inactive.


We in the process of updating our application to use Java 17 and Tomcat 
10, including javax/jakarta change. It uses Tomcat Standard Taglibs. We 
noticed that the code base [1] has been reworked 4 years ago to use 
jakarta, development version is 2.0.0-SNAPSHOT.


Are there plans to release the 2.0.0 version?


No plans.

Tomcat 10.1.x onwards uses the 1.2.5 taglibs release converted for 
Jakarta EE using the Tomcat migration tool.


Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Jeroen Hoffman

Hi everybody,

I have a question on Tomcat taglibs, I chose this mailing list because 
the taglibs-user one seems inactive.


We in the process of updating our application to use Java 17 and Tomcat 
10, including javax/jakarta change. It uses Tomcat Standard Taglibs. We 
noticed that the code base [1] has been reworked 4 years ago to use 
jakarta, development version is 2.0.0-SNAPSHOT.


Are there plans to release the 2.0.0 version?

Regards,
Jeroen Hoffman

[1] https://github.com/apache/tomcat-taglibs-standard


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Update javax libs to Jakarta libs in Apache Taglibs.

2023-07-13 Thread Christopher Schultz

Mark,

On 7/13/23 08:08, Mark Thomas wrote:

12 Jul 2023 11:08:23 CHILUKA BHARATH :


Hi Team,

The latest Apache Taglibs(
https://tomcat.apache.org/download-taglibs.cgi#Standard-1.2.5) jar 
classes

using javax.servlet.* packages.

Do we have any information w.r.t supporting Jakarta when using this
specific jar ?

If not, is there any plan to release new jars by migrating javax 
references

to jakarta in Apache Taglibs ?.


Just run them through the Tomcat migration tool for Jakarta EE. Tomcat 
10 did that for the examples web application.


No plans I am aware of for a new release.


While this will indeed work, I think it's reasonable for the Tomcat team 
to produce an official release which supports Jakarta EE... but only if 
it's a project that we really want to continue to support.


As Thomas points-out, Glassfish has their own JSTL implementation and I 
think probably most people already use that.


Is it time to retire Tomcat JSTL? I think we should make a decision one 
way or the other and then take proper action. That either means moving 
Tomcat-taglibs to the Attic or producing a new version for the Jakarta 
EE era.


There are far too many OSS projects out there saying "yeah Jakarta EE is 
coming but nobody is using it yet so we won't bother to release a 
compatible library until adoption is up." The the trick is that adoption 
is slow precisely because all these dependencies won't move first.


-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Update javax libs to Jakarta libs in Apache Taglibs.

2023-07-13 Thread Mark Thomas

12 Jul 2023 11:08:23 CHILUKA BHARATH :


Hi Team,

The latest Apache Taglibs(
https://tomcat.apache.org/download-taglibs.cgi#Standard-1.2.5) jar 
classes

using javax.servlet.* packages.

Do we have any information w.r.t supporting Jakarta when using this
specific jar ?

If not, is there any plan to release new jars by migrating javax 
references

to jakarta in Apache Taglibs ?.


Just run them through the Tomcat migration tool for Jakarta EE. Tomcat 10 
did that for the examples web application.


No plans I am aware of for a new release.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



AW: Update javax libs to Jakarta libs in Apache Taglibs.

2023-07-13 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Bharath,

> -Ursprüngliche Nachricht-
> Von: Christopher Schultz 
> Gesendet: Mittwoch, 12. Juli 2023 21:51
> An: Tomcat Users List ; CHILUKA BHARATH
> 
> Betreff: Re: Update javax libs to Jakarta libs in Apache Taglibs.
> 
> Bharath,
> 
> On 7/12/23 05:08, CHILUKA BHARATH wrote:
> > The latest Apache Taglibs(
> > https://tomcat.apache.org/download-taglibs.cgi#Standard-1.2.5) jar
> > classes using javax.servlet.* packages.
> >
> > Do we have any information w.r.t supporting Jakarta when using this
> > specific jar ?
> >
> > If not, is there any plan to release new jars by migrating javax
> > references to jakarta in Apache Taglibs ?.
> 
> This is a very good question.
> 
>  From what I can tell, the latest release of taglibs (1.2.5) was released 
> back in
> 2015.
> 
> The first question I would have about this is: Does anybody still care about
> Tomcat STL? Obviously, _you_ care, but is this a project that has simply
> matured to the point that it no longer needs updates, or has it been
> abandoned? Olivier did some work back in 2020 -- including a migration from
> javax.* to jakarta.* -- but there hasn't been any meaningful activity since
> then.
> 
> Bharath, are you able to check-out the "main" branch and build it, and does it
> work for you? We could simply release what we have currently as a beta and
> get community feedback. The only question is "what community?" We rarely
> get questions on the list and I'm not sure how many potential users there
> are.
> 
> Is there a TCK for JSTL? I don't use JSP for any meaningful project myself, 
> and
> setting-up test-cases to even validate that the basics are working properly
> will be time-consuming.
> 
> -chris
> 

This package uses jakarta:
https://mvnrepository.com/artifact/jakarta.servlet.jsp.jstl/jakarta.servlet.jsp.jstl-api
The implementation is for example:
https://mvnrepository.com/artifact/org.glassfish.web/jakarta.servlet.jsp.jstl

Greetings,
Thomas


Re: Update javax libs to Jakarta libs in Apache Taglibs.

2023-07-12 Thread Christopher Schultz

Bharath,

On 7/12/23 05:08, CHILUKA BHARATH wrote:

The latest Apache Taglibs(
https://tomcat.apache.org/download-taglibs.cgi#Standard-1.2.5) jar classes
using javax.servlet.* packages.

Do we have any information w.r.t supporting Jakarta when using this
specific jar ?

If not, is there any plan to release new jars by migrating javax references
to jakarta in Apache Taglibs ?.


This is a very good question.

From what I can tell, the latest release of taglibs (1.2.5) was 
released back in 2015.


The first question I would have about this is: Does anybody still care 
about Tomcat STL? Obviously, _you_ care, but is this a project that has 
simply matured to the point that it no longer needs updates, or has it 
been abandoned? Olivier did some work back in 2020 -- including a 
migration from javax.* to jakarta.* -- but there hasn't been any 
meaningful activity since then.


Bharath, are you able to check-out the "main" branch and build it, and 
does it work for you? We could simply release what we have currently as 
a beta and get community feedback. The only question is "what 
community?" We rarely get questions on the list and I'm not sure how 
many potential users there are.


Is there a TCK for JSTL? I don't use JSP for any meaningful project 
myself, and setting-up test-cases to even validate that the basics are 
working properly will be time-consuming.


-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Update javax libs to Jakarta libs in Apache Taglibs.

2023-07-12 Thread CHILUKA BHARATH
Hi Team,

The latest Apache Taglibs(
https://tomcat.apache.org/download-taglibs.cgi#Standard-1.2.5) jar classes
using javax.servlet.* packages.

Do we have any information w.r.t supporting Jakarta when using this
specific jar ?

If not, is there any plan to release new jars by migrating javax references
to jakarta in Apache Taglibs ?.


Thanks,
Bharath.


Re: JSP custom tag operating different when adoptOpenJDK is used vs Oracle (cross post from tomcat-taglibs-user)

2019-10-31 Thread LoBello,Jeff
https://bz.apache.org/bugzilla/show_bug.cgi?id=63898


Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: "LoBello,Jeff" 
Reply-To: Tomcat Users List 
Date: Thursday, October 31, 2019 at 6:49 PM
To: Tomcat Users List 
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)

My inclination is that this is a tomcat bug in all versions when newer versions 
of Java 1.8 are used & there are overloaded setters.  In our case, we have the 
following in our TLD…


value
true
true
java.lang.Object


Yet tomcat generates EL expression evaluation to java.lang.String when there’s 
an overloaded setter. I’m not aware of any official position on overloaded 
setters & JSTL tag classes.

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: "LoBello,Jeff" 
mailto:jeff.lobe...@cerner.com.INVALID>>
Reply-To: Tomcat Users List 
mailto:users@tomcat.apache.org>>
Date: Thursday, October 31, 2019 at 5:19 PM
To: Tomcat Users List mailto:users@tomcat.apache.org>>
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)

We have found this issue manifests in Oracle & adopt open JDK if using the 
current versions of 1.8.

Adopt jdk standard (1.8.0.222) issue
Oracle jdk shiny new (1.8.0.231) issue
Oracle jdk 4.3.100 style (1.8.0.201) no issue
Adopt jdk older (1.8.0.202) NO ISSUE.

We’re changing our code to remove overloaded setter with JSTL.  Our concern is 
we obviously can’t fix 3rd party code that may be affected by this JVM bug.  
Should we look into filing a bug report with Oracle or Tomcat?

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: "LoBello,Jeff" 
mailto:jeff.lobe...@cerner.com><mailto:jeff.lobe...@cerner.com><mailto:jeff.lobe...@cerner.com%3e>>
Date: Monday, October 28, 2019 at 9:31 AM
To: Tomcat Users List 
mailto:users@tomcat.apache.org><mailto:users@tomcat.apache.org><mailto:users@tomcat.apache.org%3e>>
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)


That’s good to hear, you’re example works.  In our tag class, which extends 
org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport, we have 
setValue() overloaded, as follows…


public void setValue(final String value) {



public void setValue(final Object value) {

Is this a bad practice? How does tomcat decide which one to use.  Why would 
changing to adoptOpenJdk break this?

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: Felix Schumacher 
mailto:felix.schumac...@internetallee.de><mailto:felix.schumac...@internetallee.de><mailto:felix.schumac...@internetallee.de%3e>>
Reply-To: Tomcat Users List 
mailto:users@tomcat.apache.org><mailto:users@tomcat.apache.org><mailto:users@tomcat.apache.org%3e>>
Date: Sunday, October 27, 2019 at 2:52 PM
To: 
"users@tomcat.apache.org<mailto:users@tomcat.apache.org><mailto:users@tomcat.apache.org><mailto:users@tomcat.apache.org%3e>"
 
mailto:users@tomcat.apache.org><mailto:users@tomcat.apache.org><mailto:users@tomcat.apache.org%3e>>
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)

I tried to reproduce the bug with the following simple jsp:

<%@ taglib prefix = "fmt" uri = 
"https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fjava.sun.com%2Fjsp%2Fjstl%2Ffmtdata=02%7C01%7CJeff.Lobello%40cerner.com%7C0d4788d7c78a42137fea08d75e54a165%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637081589912459587sdata=cskEb6dEvylNEYkIX3GL%2FEVAPhXYCxbfy2jrYhyDoOg%3Dreserved=0;
 %>


   
  String/Object bug
   

   
  <%
request.setAttribute("now", new java.util.Date());
  %>
  
   


but both Java versions (oracle 1.8.0_201 and openjdk 1.8.0_222) produce
the following java parts with tomcat 9.0.27:

...
// /index.jsp(12,6) name = value type = null reqTime = true required =
true fragment = false deferredValue = false expectedTypeName = null
deferredMethod = false methodSignature = null
  _jspx_th_fmt_005fformatDate_005f0.setValue((java.util.Date)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${now}",
java.util.Date.class, (javax.servlet.jsp.PageContext)_jspx_page_context,
null));
...

Can you share your tag implementation or even better give us a minimal
webapp that shows the error?

Is the Tomcat version the same for the different Java implementations?

Felix

Am 27.10.19 um 18:14 schrieb LoBello,Jeff:
Sorry for 

Re: JSP custom tag operating different when adoptOpenJDK is used vs Oracle (cross post from tomcat-taglibs-user)

2019-10-31 Thread LoBello,Jeff
My inclination is that this is a tomcat bug in all versions when newer versions 
of Java 1.8 are used & there are overloaded setters.  In our case, we have the 
following in our TLD…


value
true
true
java.lang.Object


Yet tomcat generates EL expression evaluation to java.lang.String when there’s 
an overloaded setter. I’m not aware of any official position on overloaded 
setters & JSTL tag classes.

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: "LoBello,Jeff" 
Reply-To: Tomcat Users List 
Date: Thursday, October 31, 2019 at 5:19 PM
To: Tomcat Users List 
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)

We have found this issue manifests in Oracle & adopt open JDK if using the 
current versions of 1.8.

Adopt jdk standard (1.8.0.222) issue
Oracle jdk shiny new (1.8.0.231) issue
Oracle jdk 4.3.100 style (1.8.0.201) no issue
Adopt jdk older (1.8.0.202) NO ISSUE.

We’re changing our code to remove overloaded setter with JSTL.  Our concern is 
we obviously can’t fix 3rd party code that may be affected by this JVM bug.  
Should we look into filing a bug report with Oracle or Tomcat?

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: "LoBello,Jeff" mailto:jeff.lobe...@cerner.com>>
Date: Monday, October 28, 2019 at 9:31 AM
To: Tomcat Users List mailto:users@tomcat.apache.org>>
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)


That’s good to hear, you’re example works.  In our tag class, which extends 
org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport, we have 
setValue() overloaded, as follows…


public void setValue(final String value) {



public void setValue(final Object value) {

Is this a bad practice? How does tomcat decide which one to use.  Why would 
changing to adoptOpenJdk break this?

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: Felix Schumacher 
mailto:felix.schumac...@internetallee.de>>
Reply-To: Tomcat Users List 
mailto:users@tomcat.apache.org>>
Date: Sunday, October 27, 2019 at 2:52 PM
To: "users@tomcat.apache.org<mailto:users@tomcat.apache.org>" 
mailto:users@tomcat.apache.org>>
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)

I tried to reproduce the bug with the following simple jsp:

<%@ taglib prefix = "fmt" uri = 
"https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fjava.sun.com%2Fjsp%2Fjstl%2Ffmtdata=02%7C01%7CJeff.Lobello%40cerner.com%7C0072abd9995a46eea13908d75e48092a%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C1%7C637081535837070958sdata=ov9ysbkVhDEqlv0JBYfRIS4HqSeSE1u2t4qBPzwLyTw%3Dreserved=0;
 %>


   
  String/Object bug
   

   
  <%
request.setAttribute("now", new java.util.Date());
  %>
  
   


but both Java versions (oracle 1.8.0_201 and openjdk 1.8.0_222) produce
the following java parts with tomcat 9.0.27:

...
// /index.jsp(12,6) name = value type = null reqTime = true required =
true fragment = false deferredValue = false expectedTypeName = null
deferredMethod = false methodSignature = null
  _jspx_th_fmt_005fformatDate_005f0.setValue((java.util.Date)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${now}",
java.util.Date.class, (javax.servlet.jsp.PageContext)_jspx_page_context,
null));
...

Can you share your tag implementation or even better give us a minimal
webapp that shows the error?

Is the Tomcat version the same for the different Java implementations?

Felix

Am 27.10.19 um 18:14 schrieb LoBello,Jeff:
Sorry for not mentioning that before, Felix.  I’ve seen this bug under Mac & 
Windows Java versions.  We only support Java 1.8, at the moment.


Mac:

openjdk version "1.8.0_222"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)



Windows:

openjdk version "1.8.0_192"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)

We’ve also reproduced this issue with multiple Tomcat versions, including 7, 8 
& 9.   If we use Oracle Java, the issue is fixed & doesn’t happen.  The bug is 
very subtle since the JSP does compile, but the data passed to our tag is a 
String instead of a Date object.

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: Felix Schumacher 
mailto:felix.schumac...@internetallee.de><mailto:felix.schumac...@internetallee.de><mailto:felix.schumac...@i

Re: JSP custom tag operating different when adoptOpenJDK is used vs Oracle (cross post from tomcat-taglibs-user)

2019-10-31 Thread LoBello,Jeff
We have found this issue manifests in Oracle & adopt open JDK if using the 
current versions of 1.8.

Adopt jdk standard (1.8.0.222) issue
Oracle jdk shiny new (1.8.0.231) issue
Oracle jdk 4.3.100 style (1.8.0.201) no issue
Adopt jdk older (1.8.0.202) NO ISSUE.

We’re changing our code to remove overloaded setter with JSTL.  Our concern is 
we obviously can’t fix 3rd party code that may be affected by this JVM bug.  
Should we look into filing a bug report with Oracle or Tomcat?

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: "LoBello,Jeff" 
Date: Monday, October 28, 2019 at 9:31 AM
To: Tomcat Users List 
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)


That’s good to hear, you’re example works.  In our tag class, which extends 
org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport, we have 
setValue() overloaded, as follows…


public void setValue(final String value) {



public void setValue(final Object value) {

Is this a bad practice? How does tomcat decide which one to use.  Why would 
changing to adoptOpenJdk break this?

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: Felix Schumacher 
Reply-To: Tomcat Users List 
Date: Sunday, October 27, 2019 at 2:52 PM
To: "users@tomcat.apache.org" 
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)

I tried to reproduce the bug with the following simple jsp:

<%@ taglib prefix = "fmt" uri = 
"https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fjava.sun.com%2Fjsp%2Fjstl%2Ffmtdata=02%7C01%7CJeff.Lobello%40cerner.com%7C37f57f209f8d4449bcf508d75b0ed587%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C1%7C637077991639831717sdata=PIygTHb1ENhnrEL9v8oZYTGMyzUJfwd0GNUfz5xMEMM%3Dreserved=0;
 %>


   
  String/Object bug
   

   
  <%
request.setAttribute("now", new java.util.Date());
  %>
  
   


but both Java versions (oracle 1.8.0_201 and openjdk 1.8.0_222) produce
the following java parts with tomcat 9.0.27:

...
// /index.jsp(12,6) name = value type = null reqTime = true required =
true fragment = false deferredValue = false expectedTypeName = null
deferredMethod = false methodSignature = null
  _jspx_th_fmt_005fformatDate_005f0.setValue((java.util.Date)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${now}",
java.util.Date.class, (javax.servlet.jsp.PageContext)_jspx_page_context,
null));
...

Can you share your tag implementation or even better give us a minimal
webapp that shows the error?

Is the Tomcat version the same for the different Java implementations?

Felix

Am 27.10.19 um 18:14 schrieb LoBello,Jeff:
Sorry for not mentioning that before, Felix.  I’ve seen this bug under Mac & 
Windows Java versions.  We only support Java 1.8, at the moment.


Mac:

openjdk version "1.8.0_222"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)



Windows:

openjdk version "1.8.0_192"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)

We’ve also reproduced this issue with multiple Tomcat versions, including 7, 8 
& 9.   If we use Oracle Java, the issue is fixed & doesn’t happen.  The bug is 
very subtle since the JSP does compile, but the data passed to our tag is a 
String instead of a Date object.

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: Felix Schumacher 
mailto:felix.schumac...@internetallee.de>>
Reply-To: Tomcat Users List 
mailto:users@tomcat.apache.org>>
Date: Saturday, October 26, 2019 at 4:18 PM
To: Tomcat Users List mailto:users@tomcat.apache.org>>
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)



Am 25. Oktober 2019 19:33:19 MESZ schrieb "LoBello,Jeff" 
mailto:jeff.lobe...@cerner.com.INVALID><mailto:jeff.lobe...@cerner.com.INVALID><mailto:jeff.lobe...@cerner.com.INVALID%3e>>:
We have a custom tag, FormatDateTag extends
org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.  It’s
been working ok for a number of years under tomcat & Oracle JVM.  Now,
we are moving to adoptOpenJDK  & we are seeing some differences in how
tomcat generation of JSP to Java classes happens when tomcat is doing
the EL evaluation.  Here is an example JSP which shows the issue…

Which Java versions have you used exactly? What os was this? Which tomcat 
version have you used?

Are there any other differences in the setup?

Felix


<%@ page language="java" contentType=&q

Re: JSP custom tag operating different when adoptOpenJDK is used vs Oracle (cross post from tomcat-taglibs-user)

2019-10-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeff,

On 10/28/19 09:31, LoBello,Jeff wrote:
> That’s good to hear, you’re example works.  In our tag class, which
> extends
> org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport, we
> have setValue() overloaded, as follows…
> 
> 
> public void setValue(final String value) {
> 
> 
> 
> public void setValue(final Object value) {
> 
> Is this a bad practice? How does tomcat decide which one to use.
> Why would changing to adoptOpenJdk break this?

My guess is that Tomcat is not following some edge-case of the
specification, and that when you use the AdoptJDK JVM, the methods
from Class.getDeclaredMethod are being returned in a slightly
different order, and Tomcat picks a different method.

Just a guess. But, it *should* be consistent across JVMs.

- -chris

> From: Felix Schumacher  
> Reply-To: Tomcat Users List  Date: Sunday,
> October 27, 2019 at 2:52 PM To: "users@tomcat.apache.org"
>  Subject: Re: JSP custom tag operating
> different when adoptOpenJDK is used vs Oracle (cross post from
> tomcat-taglibs-user)
> 
> I tried to reproduce the bug with the following simple jsp:
> 
> <%@ taglib prefix = "fmt" uri =
> "https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fjava
.sun.com%2Fjsp%2Fjstl%2Ffmtdata=02%7C01%7CJeff.Lobello%40cerner.com
%7C37f57f209f8d4449bcf508d75b0ed587%7Cfbc493a80d244454a815f4ca58e8c09d%7
C0%7C1%7C637077991639831717sdata=PIygTHb1ENhnrEL9v8oZYTGMyzUJfwd0GN
Ufz5xMEMM%3Dreserved=0"
> %>
> 
>   String/Object bug 
> 
>  <% request.setAttribute("now", new java.util.Date()); %> 
>   
> 
> 
> but both Java versions (oracle 1.8.0_201 and openjdk 1.8.0_222)
> produce the following java parts with tomcat 9.0.27:
> 
> ... // /index.jsp(12,6) name = value type = null reqTime = true
> required = true fragment = false deferredValue = false
> expectedTypeName = null deferredMethod = false methodSignature =
> null _jspx_th_fmt_005fformatDate_005f0.setValue((java.util.Date) 
> org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${now}"
,
>
> 
java.util.Date.class, (javax.servlet.jsp.PageContext)_jspx_page_context,
> null)); ...
> 
> Can you share your tag implementation or even better give us a
> minimal webapp that shows the error?
> 
> Is the Tomcat version the same for the different Java
> implementations?
> 
> Felix
> 
> Am 27.10.19 um 18:14 schrieb LoBello,Jeff: Sorry for not mentioning
> that before, Felix.  I’ve seen this bug under Mac & Windows Java
> versions.  We only support Java 1.8, at the moment.
> 
> 
> Mac:
> 
> openjdk version "1.8.0_222"
> 
> OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
> 
> OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed
> mode)
> 
> 
> 
> Windows:
> 
> openjdk version "1.8.0_192"
> 
> OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)
> 
> OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed
> mode)
> 
> We’ve also reproduced this issue with multiple Tomcat versions,
> including 7, 8 & 9.   If we use Oracle Java, the issue is fixed &
> doesn’t happen.  The bug is very subtle since the JSP does compile,
> but the data passed to our tag is a String instead of a Date
> object.
> 
> Thanks,
> 
> Jeff LoBello Lead Software Engineer Cerner |
> www.cerner.com<http://www.cerner.com/>
> 
> 
> 
> From: Felix Schumacher
> mailto:felix.schumacher@internetall
ee.de>>
>
> 
Reply-To: Tomcat Users List
mailto:users@tomcat.apache.org>>
> Date: Saturday, October 26, 2019 at 4:18 PM To: Tomcat Users List
> mailto:users@tomcat.apache.org>> Subject:
> Re: JSP custom tag operating different when adoptOpenJDK is used vs
> Oracle (cross post from tomcat-taglibs-user)
> 
> 
> 
> Am 25. Oktober 2019 19:33:19 MESZ schrieb "LoBello,Jeff"
> mailto:jeff.lobe...@cerner.com.INVALI
D><mailto:jeff.lobe...@cerner.com.INVALID><mailto:jeff.lobe...@cerner.co
m.INVALID%3e>>:
>
> 
We have a custom tag, FormatDateTag extends
> org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.
> It’s been working ok for a number of years under tomcat & Oracle
> JVM.  Now, we are moving to adoptOpenJDK  & we are seeing some
> differences in how tomcat generation of JSP to Java classes happens
> when tomcat is doing the EL evaluation.  Here is an example JSP
> which shows the issue…
> 
> Which Java versions have you used exactly? What os was this? Which
> tomcat version have you used?
> 
> Are there any other differences in the setup?
> 
> Felix
> 
> 
> <%@ p

Re: JSP custom tag operating different when adoptOpenJDK is used vs Oracle (cross post from tomcat-taglibs-user)

2019-10-28 Thread LoBello,Jeff
That’s good to hear, you’re example works.  In our tag class, which extends 
org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport, we have 
setValue() overloaded, as follows…


public void setValue(final String value) {



public void setValue(final Object value) {

Is this a bad practice? How does tomcat decide which one to use.  Why would 
changing to adoptOpenJdk break this?

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: Felix Schumacher 
Reply-To: Tomcat Users List 
Date: Sunday, October 27, 2019 at 2:52 PM
To: "users@tomcat.apache.org" 
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)

I tried to reproduce the bug with the following simple jsp:

<%@ taglib prefix = "fmt" uri = 
"https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fjava.sun.com%2Fjsp%2Fjstl%2Ffmtdata=02%7C01%7CJeff.Lobello%40cerner.com%7C37f57f209f8d4449bcf508d75b0ed587%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C1%7C637077991639831717sdata=PIygTHb1ENhnrEL9v8oZYTGMyzUJfwd0GNUfz5xMEMM%3Dreserved=0;
 %>


   
  String/Object bug
   

   
  <%
request.setAttribute("now", new java.util.Date());
  %>
  
   


but both Java versions (oracle 1.8.0_201 and openjdk 1.8.0_222) produce
the following java parts with tomcat 9.0.27:

...
// /index.jsp(12,6) name = value type = null reqTime = true required =
true fragment = false deferredValue = false expectedTypeName = null
deferredMethod = false methodSignature = null
  _jspx_th_fmt_005fformatDate_005f0.setValue((java.util.Date)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${now}",
java.util.Date.class, (javax.servlet.jsp.PageContext)_jspx_page_context,
null));
...

Can you share your tag implementation or even better give us a minimal
webapp that shows the error?

Is the Tomcat version the same for the different Java implementations?

Felix

Am 27.10.19 um 18:14 schrieb LoBello,Jeff:
Sorry for not mentioning that before, Felix.  I’ve seen this bug under Mac & 
Windows Java versions.  We only support Java 1.8, at the moment.


Mac:

openjdk version "1.8.0_222"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)



Windows:

openjdk version "1.8.0_192"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)

We’ve also reproduced this issue with multiple Tomcat versions, including 7, 8 
& 9.   If we use Oracle Java, the issue is fixed & doesn’t happen.  The bug is 
very subtle since the JSP does compile, but the data passed to our tag is a 
String instead of a Date object.

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: Felix Schumacher 
mailto:felix.schumac...@internetallee.de>>
Reply-To: Tomcat Users List 
mailto:users@tomcat.apache.org>>
Date: Saturday, October 26, 2019 at 4:18 PM
To: Tomcat Users List mailto:users@tomcat.apache.org>>
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)



Am 25. Oktober 2019 19:33:19 MESZ schrieb "LoBello,Jeff" 
mailto:jeff.lobe...@cerner.com.INVALID><mailto:jeff.lobe...@cerner.com.INVALID><mailto:jeff.lobe...@cerner.com.INVALID%3e>>:
We have a custom tag, FormatDateTag extends
org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.  It’s
been working ok for a number of years under tomcat & Oracle JVM.  Now,
we are moving to adoptOpenJDK  & we are seeing some differences in how
tomcat generation of JSP to Java classes happens when tomcat is doing
the EL evaluation.  Here is an example JSP which shows the issue…

Which Java versions have you used exactly? What os was this? Which tomcat 
version have you used?

Are there any other differences in the setup?

Felix


<%@ page language="java" contentType="text/html" isELIgnored="false" %>
<%@ page import="java.util.Date" %>
<%@ taglib uri="/WEB-INF/tld/suitags.tld" prefix="sui" %>

<%
Date chdt = new Date();
request.setAttribute("chdt", chdt);
%>



Looking at the compiled JSP source code under Oracle JVM, we see this…

// /tagUnitTests/sui/formatDate/testCaliHDateTime1.jsp(20,0) name =
value type = java.lang.Object reqTime = true required = true fragment =
false deferredValue = false expectedTypeName = null deferredMethod =
false methodSignature = null
_jspx_th_sui_005fformatDate_005f0.setValue((java.lang.Object)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${chdt}",
java.lang.Object.class,
(javax.servlet.jsp.PageContext)_jspx_page_context, null));

The sam

Re: JSP custom tag operating different when adoptOpenJDK is used vs Oracle (cross post from tomcat-taglibs-user)

2019-10-27 Thread Felix Schumacher
I tried to reproduce the bug with the following simple jsp:

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


   
  String/Object bug
   

   
  <%
    request.setAttribute("now", new java.util.Date());
  %>
  
   


but both Java versions (oracle 1.8.0_201 and openjdk 1.8.0_222) produce
the following java parts with tomcat 9.0.27:

...
// /index.jsp(12,6) name = value type = null reqTime = true required =
true fragment = false deferredValue = false expectedTypeName = null
deferredMethod = false methodSignature = null
  _jspx_th_fmt_005fformatDate_005f0.setValue((java.util.Date)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${now}",
java.util.Date.class, (javax.servlet.jsp.PageContext)_jspx_page_context,
null));
...

Can you share your tag implementation or even better give us a minimal
webapp that shows the error?

Is the Tomcat version the same for the different Java implementations?

Felix

Am 27.10.19 um 18:14 schrieb LoBello,Jeff:
> Sorry for not mentioning that before, Felix.  I’ve seen this bug under Mac & 
> Windows Java versions.  We only support Java 1.8, at the moment.
>
>
> Mac:
>
> openjdk version "1.8.0_222"
>
> OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
>
> OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)
>
>
>
> Windows:
>
> openjdk version "1.8.0_192"
>
> OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)
>
> OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)
>
> We’ve also reproduced this issue with multiple Tomcat versions, including 7, 
> 8 & 9.   If we use Oracle Java, the issue is fixed & doesn’t happen.  The bug 
> is very subtle since the JSP does compile, but the data passed to our tag is 
> a String instead of a Date object.
>
> Thanks,
>
> Jeff LoBello
> Lead Software Engineer
> Cerner | www.cerner.com<http://www.cerner.com/>
>
>
>
> From: Felix Schumacher 
> Reply-To: Tomcat Users List 
> Date: Saturday, October 26, 2019 at 4:18 PM
> To: Tomcat Users List 
> Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
> Oracle (cross post from tomcat-taglibs-user)
>
>
>
> Am 25. Oktober 2019 19:33:19 MESZ schrieb "LoBello,Jeff" 
> mailto:jeff.lobe...@cerner.com.INVALID>>:
> We have a custom tag, FormatDateTag extends
> org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.  It’s
> been working ok for a number of years under tomcat & Oracle JVM.  Now,
> we are moving to adoptOpenJDK  & we are seeing some differences in how
> tomcat generation of JSP to Java classes happens when tomcat is doing
> the EL evaluation.  Here is an example JSP which shows the issue…
>
> Which Java versions have you used exactly? What os was this? Which tomcat 
> version have you used?
>
> Are there any other differences in the setup?
>
> Felix
>
>
> <%@ page language="java" contentType="text/html" isELIgnored="false" %>
> <%@ page import="java.util.Date" %>
> <%@ taglib uri="/WEB-INF/tld/suitags.tld" prefix="sui" %>
>
> <%
> Date chdt = new Date();
> request.setAttribute("chdt", chdt);
> %>
>
> 
>
> Looking at the compiled JSP source code under Oracle JVM, we see this…
>
> // /tagUnitTests/sui/formatDate/testCaliHDateTime1.jsp(20,0) name =
> value type = java.lang.Object reqTime = true required = true fragment =
> false deferredValue = false expectedTypeName = null deferredMethod =
> false methodSignature = null
> _jspx_th_sui_005fformatDate_005f0.setValue((java.lang.Object)
> org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${chdt}",
> java.lang.Object.class,
> (javax.servlet.jsp.PageContext)_jspx_page_context, null));
>
> The same source compiled using AdoptOpenJDK, we see this…
>
> // /tagUnitTests/sui/formatDate/ testCaliHDateTime1.jsp(20,0) name =
> value type = java.lang.Object reqTime = true required = true fragment =
> false deferredValue = false expectedTypeName = null deferredMethod =
> false methodSignature = null
> _jspx_th_sui_005fformatDate_005f0.setValue((java.lang.String)
> org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${chdt}",
> java.lang.String.class,
> (javax.servlet.jsp.PageContext)_jspx_page_context, null));
>
> As a workaround, we’re adding calls to  to convert the
> String back to a Date.  Has anyone run into this? Any ideas we can try
> to find the root cause?
>
> Thanks,
>
> Jeff LoBello
> Lead Software Engineer
> Cerner | www.cerner.com<http://www.cerner.

Re: JSP custom tag operating different when adoptOpenJDK is used vs Oracle (cross post from tomcat-taglibs-user)

2019-10-27 Thread LoBello,Jeff
Sorry for not mentioning that before, Felix.  I’ve seen this bug under Mac & 
Windows Java versions.  We only support Java 1.8, at the moment.


Mac:

openjdk version "1.8.0_222"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)



Windows:

openjdk version "1.8.0_192"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)

We’ve also reproduced this issue with multiple Tomcat versions, including 7, 8 
& 9.   If we use Oracle Java, the issue is fixed & doesn’t happen.  The bug is 
very subtle since the JSP does compile, but the data passed to our tag is a 
String instead of a Date object.

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>



From: Felix Schumacher 
Reply-To: Tomcat Users List 
Date: Saturday, October 26, 2019 at 4:18 PM
To: Tomcat Users List 
Subject: Re: JSP custom tag operating different when adoptOpenJDK is used vs 
Oracle (cross post from tomcat-taglibs-user)



Am 25. Oktober 2019 19:33:19 MESZ schrieb "LoBello,Jeff" 
mailto:jeff.lobe...@cerner.com.INVALID>>:
We have a custom tag, FormatDateTag extends
org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.  It’s
been working ok for a number of years under tomcat & Oracle JVM.  Now,
we are moving to adoptOpenJDK  & we are seeing some differences in how
tomcat generation of JSP to Java classes happens when tomcat is doing
the EL evaluation.  Here is an example JSP which shows the issue…

Which Java versions have you used exactly? What os was this? Which tomcat 
version have you used?

Are there any other differences in the setup?

Felix


<%@ page language="java" contentType="text/html" isELIgnored="false" %>
<%@ page import="java.util.Date" %>
<%@ taglib uri="/WEB-INF/tld/suitags.tld" prefix="sui" %>

<%
Date chdt = new Date();
request.setAttribute("chdt", chdt);
%>



Looking at the compiled JSP source code under Oracle JVM, we see this…

// /tagUnitTests/sui/formatDate/testCaliHDateTime1.jsp(20,0) name =
value type = java.lang.Object reqTime = true required = true fragment =
false deferredValue = false expectedTypeName = null deferredMethod =
false methodSignature = null
_jspx_th_sui_005fformatDate_005f0.setValue((java.lang.Object)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${chdt}",
java.lang.Object.class,
(javax.servlet.jsp.PageContext)_jspx_page_context, null));

The same source compiled using AdoptOpenJDK, we see this…

// /tagUnitTests/sui/formatDate/ testCaliHDateTime1.jsp(20,0) name =
value type = java.lang.Object reqTime = true required = true fragment =
false deferredValue = false expectedTypeName = null deferredMethod =
false methodSignature = null
_jspx_th_sui_005fformatDate_005f0.setValue((java.lang.String)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${chdt}",
java.lang.String.class,
(javax.servlet.jsp.PageContext)_jspx_page_context, null));

As a workaround, we’re adding calls to  to convert the
String back to a Date.  Has anyone run into this? Any ideas we can try
to find the root cause?

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com<http://www.cerner.com/>




CONFIDENTIALITY NOTICE This message and any included attachments are
from Cerner Corporation and are intended only for the addressee. The
information contained in this message is confidential and may
constitute inside or non-public information under international,
federal, or state securities laws. Unauthorized forwarding, printing,
copying, distribution, or use of such information is strictly
prohibited and may be unlawful. If you are not the addressee, please
promptly delete this message and notify the sender of the delivery
error by e-mail or you may call Cerner's corporate offices in Kansas
City, Missouri, U.S.A at (+1) (816)221-1024.

-
To unsubscribe, e-mail: 
users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org>
For additional commands, e-mail: 
users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org>




CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.


Re: JSP custom tag operating different when adoptOpenJDK is used vs Oracle (cross post from tomcat-taglibs-user)

2019-10-26 Thread Felix Schumacher



Am 25. Oktober 2019 19:33:19 MESZ schrieb "LoBello,Jeff" 
:
>We have a custom tag, FormatDateTag extends
>org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.  It’s
>been working ok for a number of years under tomcat & Oracle JVM.  Now,
>we are moving to adoptOpenJDK  & we are seeing some differences in how
>tomcat generation of JSP to Java classes happens when tomcat is doing
>the EL evaluation.  Here is an example JSP which shows the issue…

Which Java versions have you used exactly? What os was this? Which tomcat 
version have you used? 

Are there any other differences in the setup? 

Felix 

>
><%@ page language="java" contentType="text/html" isELIgnored="false" %>
><%@ page import="java.util.Date" %>
><%@ taglib uri="/WEB-INF/tld/suitags.tld" prefix="sui" %>
>
><%
>Date chdt = new Date();
>request.setAttribute("chdt", chdt);
>%>
>
>
>
>Looking at the compiled JSP source code under Oracle JVM, we see this…
>
>// /tagUnitTests/sui/formatDate/testCaliHDateTime1.jsp(20,0) name =
>value type = java.lang.Object reqTime = true required = true fragment =
>false deferredValue = false expectedTypeName = null deferredMethod =
>false methodSignature = null
>_jspx_th_sui_005fformatDate_005f0.setValue((java.lang.Object)
>org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${chdt}",
>java.lang.Object.class,
>(javax.servlet.jsp.PageContext)_jspx_page_context, null));
>
>The same source compiled using AdoptOpenJDK, we see this…
>
>// /tagUnitTests/sui/formatDate/ testCaliHDateTime1.jsp(20,0) name =
>value type = java.lang.Object reqTime = true required = true fragment =
>false deferredValue = false expectedTypeName = null deferredMethod =
>false methodSignature = null
>_jspx_th_sui_005fformatDate_005f0.setValue((java.lang.String)
>org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${chdt}",
>java.lang.String.class,
>(javax.servlet.jsp.PageContext)_jspx_page_context, null));
>
>As a workaround, we’re adding calls to  to convert the
>String back to a Date.  Has anyone run into this? Any ideas we can try
>to find the root cause?
>
>Thanks,
>
>Jeff LoBello
>Lead Software Engineer
>Cerner | www.cerner.com
>
>
>
>
>CONFIDENTIALITY NOTICE This message and any included attachments are
>from Cerner Corporation and are intended only for the addressee. The
>information contained in this message is confidential and may
>constitute inside or non-public information under international,
>federal, or state securities laws. Unauthorized forwarding, printing,
>copying, distribution, or use of such information is strictly
>prohibited and may be unlawful. If you are not the addressee, please
>promptly delete this message and notify the sender of the delivery
>error by e-mail or you may call Cerner's corporate offices in Kansas
>City, Missouri, U.S.A at (+1) (816)221-1024.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



JSP custom tag operating different when adoptOpenJDK is used vs Oracle (cross post from tomcat-taglibs-user)

2019-10-25 Thread LoBello,Jeff
We have a custom tag, FormatDateTag extends 
org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.  It’s been 
working ok for a number of years under tomcat & Oracle JVM.  Now, we are moving 
to adoptOpenJDK  & we are seeing some differences in how tomcat generation of 
JSP to Java classes happens when tomcat is doing the EL evaluation.  Here is an 
example JSP which shows the issue…

<%@ page language="java" contentType="text/html" isELIgnored="false" %>
<%@ page import="java.util.Date" %>
<%@ taglib uri="/WEB-INF/tld/suitags.tld" prefix="sui" %>

<%
Date chdt = new Date();
request.setAttribute("chdt", chdt);
%>



Looking at the compiled JSP source code under Oracle JVM, we see this…

// /tagUnitTests/sui/formatDate/testCaliHDateTime1.jsp(20,0) name = value 
type = java.lang.Object reqTime = true required = true fragment = false 
deferredValue = false expectedTypeName = null deferredMethod = false 
methodSignature = null
_jspx_th_sui_005fformatDate_005f0.setValue((java.lang.Object) 
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${chdt}", 
java.lang.Object.class, (javax.servlet.jsp.PageContext)_jspx_page_context, 
null));

The same source compiled using AdoptOpenJDK, we see this…

// /tagUnitTests/sui/formatDate/ testCaliHDateTime1.jsp(20,0) name = value 
type = java.lang.Object reqTime = true required = true fragment = false 
deferredValue = false expectedTypeName = null deferredMethod = false 
methodSignature = null
_jspx_th_sui_005fformatDate_005f0.setValue((java.lang.String) 
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${chdt}", 
java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, 
null));

As a workaround, we’re adding calls to  to convert the String 
back to a Date.  Has anyone run into this? Any ideas we can try to find the 
root cause?

Thanks,

Jeff LoBello
Lead Software Engineer
Cerner | www.cerner.com




CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.


Re: taglibs

2017-11-07 Thread Ray Holme
OK, so I tried that and found one library needs to be excluded (from the 
exclusion list) - i.e. scanned
# ls jstl*; grep ".tld" jstl-*
jstl-api-1.2.jar  jstl-impl-1.2.jar
Binary file jstl-impl-1.2.jar matches

So if your rule works, I need jstl-impl to be scanned, but jstl-api could be 
excluded.
Nice! Thanks.
Ray
 

On Monday, November 6, 2017 10:54 AM, Mark H. Wood <mw...@iupui.edu> wrote:
 

 On Mon, Nov 06, 2017 at 10:13:42AM -0500, Christopher Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Ray,
> 
> On 11/6/17 9:48 AM, Ray Holme wrote:
> > I am not the primary developer. I do Java and DB development. I
> > leave the JSP for someone else (I am mostly retired but I have
> > been doing this a LONG time).> But I deal with distributions and
> > builds so I was the one who modified the "not to SCAN"
> > libraries.2.5 minutes down to less than 1 second.
> Fast and broken is worse than slow and working. :)
> 
> > But I blew it with the jstl jars so I just wanted to know if there
> > is any way to find out if the jar is a taglib.
> So... generally speaking I would say "you should know your own
> libraries" but it shouldn't be hard to determine which libraries are
> taglibs. Simply look in each JAR file to see if there are any ".tld"
> files.

That's what I thought, too.  I looked, and the jstl-api JAR doesn't
contain any TLDs.  The corresponding jstl-impl JAR does, though.

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu

   

Re: taglibs

2017-11-06 Thread Mark H. Wood
On Mon, Nov 06, 2017 at 10:13:42AM -0500, Christopher Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Ray,
> 
> On 11/6/17 9:48 AM, Ray Holme wrote:
> > I am not the primary developer. I do Java and DB development. I
> > leave the JSP for someone else (I am mostly retired but I have
> > been doing this a LONG time).> But I deal with distributions and
> > builds so I was the one who modified the "not to SCAN"
> > libraries.2.5 minutes down to less than 1 second.
> Fast and broken is worse than slow and working. :)
> 
> > But I blew it with the jstl jars so I just wanted to know if there
> > is any way to find out if the jar is a taglib.
> So... generally speaking I would say "you should know your own
> libraries" but it shouldn't be hard to determine which libraries are
> taglibs. Simply look in each JAR file to see if there are any ".tld"
> files.

That's what I thought, too.  I looked, and the jstl-api JAR doesn't
contain any TLDs.  The corresponding jstl-impl JAR does, though.

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu


signature.asc
Description: PGP signature


Re: taglibs

2017-11-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Ray,

On 11/6/17 9:48 AM, Ray Holme wrote:
> I am not the primary developer. I do Java and DB development. I
> leave the JSP for someone else (I am mostly retired but I have
> been doing this a LONG time).> But I deal with distributions and
> builds so I was the one who modified the "not to SCAN"
> libraries.2.5 minutes down to less than 1 second.
Fast and broken is worse than slow and working. :)

> But I blew it with the jstl jars so I just wanted to know if there
> is any way to find out if the jar is a taglib.
So... generally speaking I would say "you should know your own
libraries" but it shouldn't be hard to determine which libraries are
taglibs. Simply look in each JAR file to see if there are any ".tld"
files.

Some libraries include tag libraries that your application doesn't
care about, though, and you may be able to skip JAR scanning for those
JARs if you know enough about their use by your application.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloAfCYACgkQHPApP6U8
pFg/Rw//d7uXPFuCTucg9E9zGbb4mvO9pfvz+s8YLg81Z5l9b+sDvyWGpYsT9lLg
OuOqoX7jJBR2fkwKZ2xaicviuHN+u+GHTHbJjkktf+U7yv6VUNo6ZOnZBeCQOLjV
XFMXsxZl6q5o5Gn5jFBVjykqZUZSxlL98lDFJuzm7ut3wtqB/CD0ttGsHsXXBq+u
fC4jJUYzYltRR0oYw161fwRfWQ/EqFtYObZCohTvVtByO5Vh3aKHyg8s7cRqLV+7
dz/qhwmXGEvWPiQrNjcZcUEBxXymYOSCspXtX/BaWJH5vL/I78CrjgrjzzrHpz9O
w77TlYxgDe5vgRxItrHUv3Omn4QKEYTzxUKrsUpRIghquDg7UL9VqD0bSKi6Njfb
5rX+00Btt4EbRGaqfNFpDNOfbDZat8Ktk6Og6Me/SbZi/AFQrggoc+CFDSjKvHeJ
B3B8OWjexnzvaZiJ3RybO3wuPDF63Z3Sqx1JVL6JVVYi4USFj0Nf8kXGL7PcZjHu
VdxA/spAKEojzDB6vxquO5FL4VwI2T+r+4nzkp5cnFtcPj79L+B30p1Q9HGmvAQD
4i3ez+u1Hh36Wf8oovMj3v3dzesEE459kpM3Yag44vs6y6CGtuHglDArJt7BC08D
4YrQdT9r+c/pnzeV+lOTivD0vfvUdRcklJVNYQ+6jJ/n/UkCjl0=
=NUyW
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: taglibs

2017-11-06 Thread Ray Holme
Chris,
I am not the primary developer. I do Java and DB development.
I leave the JSP for someone else (I am mostly retired but I have been doing 
this a LONG time).
But I deal with distributions and builds so I was the one who modified the "not 
to SCAN" libraries.2.5 minutes down to less than 1 second.But I blew it with 
the jstl jars so I just wanted to know if there is any way to find out if the 
jar is a taglib.
I don't think we use Maven.


 

On Monday, November 6, 2017 9:05 AM, Christopher Schultz 
<ch...@christopherschultz.net> wrote:
 

 -BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Ray,

On 11/6/17 8:49 AM, Ray Holme wrote:
> So according to Mark, taglibs must NOT be listed in the
> catalina.properties file under
> tomcat.util.scan.StandardJarScanFilter.jarsToSkip Mark informed us
> that the below jstl... jars are both taglibs:  (jstl-api-1.2.jar &
> jstl-impl-1.2.jar)
> 
> Sooo - how do we determine if a jar we want to add is a taglib?

Umm... if you use a library, don't you know what it does?

Oh, maybe you are in Maven hell where you download the whole internet
in order to build/deploy your application. #sorrynotsorry

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloAbC0ACgkQHPApP6U8
pFgSqBAAyz9yTAKGE2RSyZRUwW7wUcinYV7NwqQ+7E1kC7hy2E9tCyC9E+AGiTr7
GuJHUb+yJ4UP1vKjQ2SO+Cffmxbyz1PsfMOMhO6abDJQVOj3aHbIjUw70GlS5w+7
10l8Pe39fl+5GQQHLAye/XZgGv7dNVmITFmGAfonN+1gHi5L3Kio1VaYfn/7W+vx
KvYK7DbnmcdiANDBPS9g2/pdKlxYj4frA13QOEKnwStjWrSquEuXji4RsC2iYedl
+IyGq5IVVXZ1vGEBItfQverdZrqtbkDYu3UKiJ6rFkJiI6tf56ERE+lLQYbIsDbU
Mg2gV72PlQU/CUdqb5rqDjZLVk6FfKg18DysE0ywvRY0r7dsZugiED7y2438a9kJ
EHzbZdGyNmJbT1hW4p52wyrwR/AHgKriSRsupgw4xaVQfLAFOYEv0revg9fmPr1R
BoZWu2xoqVViUgnTV4TmV/zJsezogOstK6AEL03zTc1No+Jha+yzMTl0TE7efAf9
7ACHZ02XwtidSH33QwxpyoRafxjYMF5/D/3c0GJWlwTL8dc9zlnIFFyZclWv14Vw
DeNavGVyulP5aytl30VIS+wb2N1pUdMbeGCiD1jipomtITnKI9YjUsesj0Lu7c43
C/GRx5OLBCgM5bpTjFn2KR8Yd8D5TgUoE4KYDeONaopu2Tf1rPs=
=I6Qf
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



   

Re: taglibs

2017-11-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Ray,

On 11/6/17 8:49 AM, Ray Holme wrote:
> So according to Mark, taglibs must NOT be listed in the
> catalina.properties file under
> tomcat.util.scan.StandardJarScanFilter.jarsToSkip Mark informed us
> that the below jstl... jars are both taglibs:   (jstl-api-1.2.jar &
> jstl-impl-1.2.jar)
> 
> Sooo - how do we determine if a jar we want to add is a taglib?

Umm... if you use a library, don't you know what it does?

Oh, maybe you are in Maven hell where you download the whole internet
in order to build/deploy your application. #sorrynotsorry

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloAbC0ACgkQHPApP6U8
pFgSqBAAyz9yTAKGE2RSyZRUwW7wUcinYV7NwqQ+7E1kC7hy2E9tCyC9E+AGiTr7
GuJHUb+yJ4UP1vKjQ2SO+Cffmxbyz1PsfMOMhO6abDJQVOj3aHbIjUw70GlS5w+7
10l8Pe39fl+5GQQHLAye/XZgGv7dNVmITFmGAfonN+1gHi5L3Kio1VaYfn/7W+vx
KvYK7DbnmcdiANDBPS9g2/pdKlxYj4frA13QOEKnwStjWrSquEuXji4RsC2iYedl
+IyGq5IVVXZ1vGEBItfQverdZrqtbkDYu3UKiJ6rFkJiI6tf56ERE+lLQYbIsDbU
Mg2gV72PlQU/CUdqb5rqDjZLVk6FfKg18DysE0ywvRY0r7dsZugiED7y2438a9kJ
EHzbZdGyNmJbT1hW4p52wyrwR/AHgKriSRsupgw4xaVQfLAFOYEv0revg9fmPr1R
BoZWu2xoqVViUgnTV4TmV/zJsezogOstK6AEL03zTc1No+Jha+yzMTl0TE7efAf9
7ACHZ02XwtidSH33QwxpyoRafxjYMF5/D/3c0GJWlwTL8dc9zlnIFFyZclWv14Vw
DeNavGVyulP5aytl30VIS+wb2N1pUdMbeGCiD1jipomtITnKI9YjUsesj0Lu7c43
C/GRx5OLBCgM5bpTjFn2KR8Yd8D5TgUoE4KYDeONaopu2Tf1rPs=
=I6Qf
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



taglibs

2017-11-06 Thread Ray Holme
So according to Mark, taglibs must NOT be listed in the catalina.properties 
file under  tomcat.util.scan.StandardJarScanFilter.jarsToSkip
Mark informed us that the below jstl... jars are both taglibs:   
(jstl-api-1.2.jar & jstl-impl-1.2.jar)

Sooo - how do we determine if a jar we want to add is a taglib?


Re: pgp-keys jsp taglibs

2016-04-20 Thread Konstantin Kolinko
2016-04-20 10:23 GMT+03:00 Martijn Bos <mart...@maboc.nl>:
> Hi Konstantin,
>
> On 2016-04-20 01:25:25, Konstantin Kolinko wrote:
>> 2016-04-19 23:00 GMT+03:00 Martijn Bos <mart...@maboc.nl>:
>> > Hi all,
>> >
>> > (I post in this list since I downloaded from tomcat.apache.org. If there 
>> > is a more appropriate list, off course I will try overthere)
>> >
>> > 1 - Downloaded the taglibs from 
>> > http://tomcat.apache.org/download-taglibs.cgi#Standard-1.2.5
>>
>> The "verify" word on above page links to a detailed instruction,
>> https://www.apache.org/info/verification.html
>>
>> > 2 - Downloaded the PGP signatures for the files
>> > 2 - Downloaded KEYS. (The pgp public keys from the releaser(s)  of the 
>> > files)
>> > 3 - Imported the keys into gpg:
>> > martijn@radijs:~/external_documents/Downloads$ gpg --import KEYS
>> > gpg: sleutel A7A0233C: publieke sleutel "Jeremy Boynes 
>> > <jboy...@apache.org>" geïmporteerd
>> > gpg:   Totaal aantal verwerkt: 1
>> > gpg:     geïmporteerd: 1  (RSA: 1)
>> > martijn@radijs:~/external_documents/Downloads$
>> >
>> > 4 - checked the signature of the downloaded files:
>> > martijn@radijs:~/external_documents/Downloads$ gpg 
>> > taglibs-standard-impl-1.2.5.jar.asc
>>
>> The above verification command is wrong. You must specify 2 file
>> arguments to gpg --verify.  See the verification.html page that I
>> mentioned above.
>>
>
> Thank you. I didn't read the page in the first place, because I thought I 
> know it all :-(
> (Once again I'm proven wrong)
>
> However (call me stuborn), as far as I understand, in this case my way is not 
> wrong per se.
> The verify is with a detached signature. gpg can deduct (and find) the name 
> of the file, which was signed, from the name of the detached signature.
>
> Below I copy/pasted the same verification with 1 and with 2 arguments. To me 
> the results looks the same
>
> (If the signature and the file name do not match, then my approach will not 
> work at all, ofcourse)
>
>> > gpg: gegevens in `taglibs-standard-impl-1.2.5.jar' worden verondersteld 
>> > ondertekend te zijn
>> > gpg: Ondertekening gemaakt op di 10 mrt 2015 17:11:32 CET met RSA 
>> > sleutel-ID A7A0233C
>> > gpg: Goede handtekening van "Jeremy Boynes <jboy...@apache.org>"
>> > gpg: Noot: Deze sleutel is vervallen!
>> > Vingerafdruk van de primaire sleutel: 8B46 CA49 EF48 37B8 C7F2  92DA A54A 
>> > D08E A7A0 233C
>> >
>> > It's in dutch :-)
>>
>> Executing the below command before the above one should switch it to English.
>> LANG=C
>>
>> Maybe it also needs  export LANG, I do not remember.
>>
>
> The moment I read your comment I thought:"Could've done that myself"
>
> So ... now in enlish, so everyone can read it:
>
>
> martijn@radijs:~/external_documents/Downloads$ export LANG=C
> martijn@radijs:~/external_documents/Downloads$ gpg --verify 
> taglibs-standard-compat-1.2.5.jar.asc
> gpg: assuming signed data in `taglibs-standard-compat-1.2.5.jar'
> gpg: Signature made Tue Mar 10 17:11:38 2015 CET using RSA key ID A7A0233C
> gpg: Good signature from "Jeremy Boynes <jboy...@apache.org>"
> gpg: Note: This key has expired!
> Primary key fingerprint: 8B46 CA49 EF48 37B8 C7F2  92DA A54A D08E A7A0 233C
> martijn@radijs:~/external_documents/Downloads$
>
>
> And with the signed file as a second argument:
>
> martijn@radijs:~/external_documents/Downloads$ gpg --verify 
> taglibs-standard-compat-1.2.5.jar.asc taglibs-standard-compat-1.2.5.jar
> gpg: Signature made Tue Mar 10 17:11:38 2015 CET using RSA key ID A7A0233C
> gpg: Good signature from "Jeremy Boynes <jboy...@apache.org>"
> gpg: Note: This key has expired!
> Primary key fingerprint: 8B46 CA49 EF48 37B8 C7F2  92DA A54A D08E A7A0 233C
> martijn@radijs:~/external_documents/Downloads$

There was a blog post, explaining the difference.
See a link here:
https://bz.apache.org/bugzilla/show_bug.cgi?id=57103#c6

The issue is that you goal is to verify integrity of the "jar" file.
The 1-arg invocation validates integrity of "asc" file. Whether that
result says anything about the jar depends on what the asc file is.
You may be fooled into a false positive.

The difference between two invocations is the following line:

> gpg: assuming signed data in `taglibs-standard-compat-1.2.5.jar'

It is good that it is printed, but it is easy to miss the case when
that line is missing.


>

Re: pgp-keys jsp taglibs

2016-04-20 Thread Martijn Bos
Hi Konstantin,

On 2016-04-20 01:25:25, Konstantin Kolinko wrote:
> 2016-04-19 23:00 GMT+03:00 Martijn Bos <mart...@maboc.nl>:
> > Hi all,
> >
> > (I post in this list since I downloaded from tomcat.apache.org. If there is 
> > a more appropriate list, off course I will try overthere)
> >
> > 1 - Downloaded the taglibs from 
> > http://tomcat.apache.org/download-taglibs.cgi#Standard-1.2.5
> 
> The "verify" word on above page links to a detailed instruction,
> https://www.apache.org/info/verification.html
> 
> > 2 - Downloaded the PGP signatures for the files
> > 2 - Downloaded KEYS. (The pgp public keys from the releaser(s)  of the 
> > files)
> > 3 - Imported the keys into gpg:
> > martijn@radijs:~/external_documents/Downloads$ gpg --import KEYS
> > gpg: sleutel A7A0233C: publieke sleutel "Jeremy Boynes 
> > <jboy...@apache.org>" geïmporteerd
> > gpg:   Totaal aantal verwerkt: 1
> > gpg: geïmporteerd: 1  (RSA: 1)
> > martijn@radijs:~/external_documents/Downloads$
> >
> > 4 - checked the signature of the downloaded files:
> > martijn@radijs:~/external_documents/Downloads$ gpg 
> > taglibs-standard-impl-1.2.5.jar.asc
> 
> The above verification command is wrong. You must specify 2 file
> arguments to gpg --verify.  See the verification.html page that I
> mentioned above.
> 

Thank you. I didn't read the page in the first place, because I thought I know 
it all :-(
(Once again I'm proven wrong)

However (call me stuborn), as far as I understand, in this case my way is not 
wrong per se.
The verify is with a detached signature. gpg can deduct (and find) the name of 
the file, which was signed, from the name of the detached signature.

Below I copy/pasted the same verification with 1 and with 2 arguments. To me 
the results looks the same

(If the signature and the file name do not match, then my approach will not 
work at all, ofcourse)

> > gpg: gegevens in `taglibs-standard-impl-1.2.5.jar' worden verondersteld 
> > ondertekend te zijn
> > gpg: Ondertekening gemaakt op di 10 mrt 2015 17:11:32 CET met RSA 
> > sleutel-ID A7A0233C
> > gpg: Goede handtekening van "Jeremy Boynes <jboy...@apache.org>"
> > gpg: Noot: Deze sleutel is vervallen!
> > Vingerafdruk van de primaire sleutel: 8B46 CA49 EF48 37B8 C7F2  92DA A54A 
> > D08E A7A0 233C
> >
> > It's in dutch :-)
> 
> Executing the below command before the above one should switch it to English.
> LANG=C
> 
> Maybe it also needs  export LANG, I do not remember.
> 

The moment I read your comment I thought:"Could've done that myself"

So ... now in enlish, so everyone can read it:


martijn@radijs:~/external_documents/Downloads$ export LANG=C

martijn@radijs:~/external_documents/Downloads$ gpg --verify 
taglibs-standard-compat-1.2.5.jar.asc   
gpg: assuming signed data in `taglibs-standard-compat-1.2.5.jar'

gpg: Signature made Tue Mar 10 17:11:38 2015 CET using RSA key ID A7A0233C  

gpg: Good signature from "Jeremy Boynes <jboy...@apache.org>"   

gpg: Note: This key has expired!
    
Primary key fingerprint: 8B46 CA49 EF48 37B8 C7F2  92DA A54A D08E A7A0 233C 

martijn@radijs:~/external_documents/Downloads$


And with the signed file as a second argument:

martijn@radijs:~/external_documents/Downloads$ gpg --verify 
taglibs-standard-compat-1.2.5.jar.asc taglibs-standard-compat-1.2.5.jar
gpg: Signature made Tue Mar 10 17:11:38 2015 CET using RSA key ID A7A0233C  

gpg: Good signature from "Jeremy Boynes <jboy...@apache.org>"   

gpg: Note: This key has expired!

 
Primary key fingerprint: 8B46 CA49 EF48 37B8 C7F2  92DA A54A D08E A7A0 233C 

 
martijn@radijs:~/external_documents/Downloads$

> > The message is telling me that the file is signed by key A7A0233C
> > (I never did sign this key myself..there is no trust..so gpg also tells me 
> > that)
> > Then gpg tells me "This key is expired"!!!
>

Re: pgp-keys jsp taglibs

2016-04-19 Thread Konstantin Kolinko
2016-04-19 23:00 GMT+03:00 Martijn Bos <mart...@maboc.nl>:
> Hi all,
>
> (I post in this list since I downloaded from tomcat.apache.org. If there is a 
> more appropriate list, off course I will try overthere)
>
> 1 - Downloaded the taglibs from 
> http://tomcat.apache.org/download-taglibs.cgi#Standard-1.2.5

The "verify" word on above page links to a detailed instruction,
https://www.apache.org/info/verification.html

> 2 - Downloaded the PGP signatures for the files
> 2 - Downloaded KEYS. (The pgp public keys from the releaser(s)  of the files)
> 3 - Imported the keys into gpg:
> martijn@radijs:~/external_documents/Downloads$ gpg --import KEYS
> gpg: sleutel A7A0233C: publieke sleutel "Jeremy Boynes <jboy...@apache.org>" 
> geïmporteerd
> gpg:   Totaal aantal verwerkt: 1
> gpg: geïmporteerd: 1  (RSA: 1)
> martijn@radijs:~/external_documents/Downloads$
>
> 4 - checked the signature of the downloaded files:
> martijn@radijs:~/external_documents/Downloads$ gpg 
> taglibs-standard-impl-1.2.5.jar.asc

The above verification command is wrong. You must specify 2 file
arguments to gpg --verify.  See the verification.html page that I
mentioned above.

> gpg: gegevens in `taglibs-standard-impl-1.2.5.jar' worden verondersteld 
> ondertekend te zijn
> gpg: Ondertekening gemaakt op di 10 mrt 2015 17:11:32 CET met RSA sleutel-ID 
> A7A0233C
> gpg: Goede handtekening van "Jeremy Boynes <jboy...@apache.org>"
> gpg: Noot: Deze sleutel is vervallen!
> Vingerafdruk van de primaire sleutel: 8B46 CA49 EF48 37B8 C7F2  92DA A54A 
> D08E A7A0 233C
>
> It's in dutch :-)

Executing the below command before the above one should switch it to English.
LANG=C

Maybe it also needs  export LANG, I do not remember.

> The message is telling me that the file is signed by key A7A0233C
> (I never did sign this key myself..there is no trust..so gpg also tells me 
> that)
> Then gpg tells me "This key is expired"!!!
>
> I'm not sure what to think of this...Is this a problem, or am I just to 
> paranoid?
>
> Can anyone shine his/her light on this.


$ gpg --list-keys A7A0233C

pub   2048R/A7A0233C 2012-02-25 [expired: 2016-02-25]
uid  Jeremy Boynes <jboy...@apache.org>


1. Binaries released and signed before February 2016 are OK.

2. Jeremy needs to do something with his key before signing a next
release (if there ever be one).
As said elsewhere, it is possible to change expiration date of a key
without a need to generate a new one,

http://unix.stackexchange.com/questions/177291/how-to-renew-an-expired-keypair-with-gpg

http://superuser.com/questions/813421/can-you-extend-the-expiration-date-of-an-already-expired-gpg-key

https://help.riseup.net/en/security/message-security/openpgp/best-practices#use-an-expiration-date-less-than-two-years

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



pgp-keys jsp taglibs

2016-04-19 Thread Martijn Bos
Hi all,

(I post in this list since I downloaded from tomcat.apache.org. If there is a 
more appropriate list, off course I will try overthere)

1 - Downloaded the taglibs from 
http://tomcat.apache.org/download-taglibs.cgi#Standard-1.2.5
2 - Downloaded the PGP signatures for the files
2 - Downloaded KEYS. (The pgp public keys from the releaser(s)  of the files)
3 - Imported the keys into gpg:
martijn@radijs:~/external_documents/Downloads$ gpg --import KEYS
gpg: sleutel A7A0233C: publieke sleutel "Jeremy Boynes <jboy...@apache.org>" 
geïmporteerd
gpg:   Totaal aantal verwerkt: 1
gpg: geïmporteerd: 1  (RSA: 1)
martijn@radijs:~/external_documents/Downloads$ 

4 - checked the signature of the downloaded files:
martijn@radijs:~/external_documents/Downloads$ gpg 
taglibs-standard-impl-1.2.5.jar.asc 
gpg: gegevens in `taglibs-standard-impl-1.2.5.jar' worden verondersteld 
ondertekend te zijn
gpg: Ondertekening gemaakt op di 10 mrt 2015 17:11:32 CET met RSA sleutel-ID 
A7A0233C
gpg: Goede handtekening van "Jeremy Boynes <jboy...@apache.org>"
gpg: Noot: Deze sleutel is vervallen!
Vingerafdruk van de primaire sleutel: 8B46 CA49 EF48 37B8 C7F2  92DA A54A D08E 
A7A0 233C

It's in dutch :-)
The message is telling me that the file is signed by key A7A0233C
(I never did sign this key myself..there is no trust..so gpg also tells me that)
Then gpg tells me "This key is expired"!!!

I'm not sure what to think of this...Is this a problem, or am I just to 
paranoid?

Can anyone shine his/her light on this.

-- 
Met vriendelijke groet,

Martijn Bos

(Public pgp-key : http://maboc.nl/pubkey.maboc.asc)


signature.asc
Description: Digital signature


Re: Problem with standard taglibs after precompiling a web app with TCD in 7.0.6 no support for addWebXmlMappings in jasper

2011-01-31 Thread Konstantin Kolinko
2011/1/31 John Bargos jbargo...@gmail.com:
 Hi,

 last week, I was having fun with trivial examples accessing a
 datasource with the standard taglibs with success.
 Since everything was working perfectly in jsp form and morale was high,
 I decided to precompile my web app with TCD and deploy it again in tomcat 
 7.0.6

 I installed ant, fetched dependencies, installed TCD set up the
 project's properties and fired ant compile away.

 2 questions:

 A small problem appeared with addWebXmlMappings=true. apparently ant 
 reported:

 \build.xml:67: jasper doesn't support the addWebXmlMappings attribute

That is strange, because
1) org.apache.jasper.JspC has setAddWebXmlMappings(boolean) method, so
it should not fail

2) The jasper call in build.xml (from
apache-tomcat-7.0.6-deployer.zip) is on lines 58-62, not on line 67 as
in the message.



 Apparently ant 1.8.2 with all dependencies fetched *today* isn't enough?


 java.lang.NullPointerException
     at org.apache.jasper.runtime.
 TagHandlerPool.get(TagHandlerPool.java:106)
     at index_jsp._jspx_meth_sql_query_0(Unknown Source)

1) Can you compare the java source of index_jsp._jspx_meth_sql_query_0
when generated by TCD and the one generated when index.jsp is compiled
at run time?
2) Please create a bugzilla entry.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with standard taglibs after precompiling a web app with TCD in 7.0.6 no support for addWebXmlMappings in jasper

2011-01-31 Thread John Bargos
On Mon, Jan 31, 2011 at 2:04 PM, Konstantin Kolinko
knst.koli...@gmail.com wrote:
 2011/1/31 John Bargos jbargo...@gmail.com:
 Hi,

 last week, I was having fun with trivial examples accessing a
 datasource with the standard taglibs with success.
 Since everything was working perfectly in jsp form and morale was high,
 I decided to precompile my web app with TCD and deploy it again in tomcat 
 7.0.6

 I installed ant, fetched dependencies, installed TCD set up the
 project's properties and fired ant compile away.

 2 questions:

 A small problem appeared with addWebXmlMappings=true. apparently ant 
 reported:

 \build.xml:67: jasper doesn't support the addWebXmlMappings attribute

 That is strange, because
 1) org.apache.jasper.JspC has setAddWebXmlMappings(boolean) method, so
 it should not fail

 2) The jasper call in build.xml (from
 apache-tomcat-7.0.6-deployer.zip) is on lines 58-62, not on line 67 as
 in the message.



2) don't worry about line numbers cause I added a few lines of my own
in there to set up properties, the jasper task is:

jasper validateXml=false
 uriroot=${webapp.path}
 webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml
 addWebXmlMappings=true
 outputDir=${webapp.path}/WEB-INF/classes /

1) I checked the libs in ant 1.8.2.
apparently ant ships with:

jasper-compiler.version=4.1.36
jasper-runtime.version=${jasper-compiler.version}

..in libraries.properties and you fetch those jars

I tried to find the jars in tomcat 7.0.6 \lib: there's jasper.jar and
jasper-el.jar so I'm at a loss to deduce their version, their file
sizes are very different.



 Apparently ant 1.8.2 with all dependencies fetched *today* isn't enough?


 java.lang.NullPointerException
     at org.apache.jasper.runtime.
 TagHandlerPool.get(TagHandlerPool.java:106)
     at index_jsp._jspx_meth_sql_query_0(Unknown Source)

 1) Can you compare the java source of index_jsp._jspx_meth_sql_query_0
 when generated by TCD and the one generated when index.jsp is compiled
 at run time?
 2) Please create a bugzilla entry.


The sources have vastly different init:

the one generated in tomcat is reusing TagHandlerPool:
  public void _jspInit() {
_005fjspx_005ftagPool_005fsql_005fquery_0026_005fvar_005fdataSource
= 
org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems =
org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fc_005fout_0026_005fvalue_005fnobody =
org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_el_expressionfactory =
_jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
_jsp_instancemanager =
org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
  }


while the precompiled one creates new objects:
  public index_jsp() {
_jspx_tagPool_sql_query_var_dataSource = new
org.apache.jasper.runtime.TagHandlerPool();
_jspx_tagPool_c_forEach_var_items = new
org.apache.jasper.runtime.TagHandlerPool();
_jspx_tagPool_c_out_value_nobody = new
org.apache.jasper.runtime.TagHandlerPool();
  }


The working _jspx_meth_sql_query_0:

  private boolean _jspx_meth_sql_005fquery_005f0(PageContext _jspx_page_context)
  throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
//  sql:query
org.apache.taglibs.standard.tag.rt.sql.QueryTag
_jspx_th_sql_005fquery_005f0 =
(org.apache.taglibs.standard.tag.rt.sql.QueryTag)
_005fjspx_005ftagPool_005fsql_005fquery_0026_005fvar_005fdataSource.get(org.apache.taglibs.standard.tag.rt.sql.QueryTag.class);
_jspx_th_sql_005fquery_005f0.setPageContext(_jspx_page_context);
_jspx_th_sql_005fquery_005f0.setParent(null);
// /index.jsp(15,0) name = var type = java.lang.String reqTime =
false required = true fragment = false deferredValue = false
expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sql_005fquery_005f0.setVar(users);
// /index.jsp(15,0) name = dataSource type = null reqTime = true
required = false fragment = false deferredValue = false
expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sql_005fquery_005f0.setDataSource(new String(zoomla));
int[] _jspx_push_body_count_sql_005fquery_005f0 = new int[] { 0 };
try {
  int _jspx_eval_sql_005fquery_005f0 =
_jspx_th_sql_005fquery_005f0.doStartTag();
  if (_jspx_eval_sql_005fquery_005f0 !=
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_sql_005fquery_005f0 !=
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
  out = _jspx_page_context.pushBody();
  _jspx_push_body_count_sql_005fquery_005f0[0]++;
  
_jspx_th_sql_005fquery_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent)
out

Re: Problem with standard taglibs after precompiling a web app with TCD in 7.0.6 no support for addWebXmlMappings in jasper

2011-01-31 Thread Konstantin Kolinko
2011/1/31 John Bargos jbargo...@gmail.com:
 1) I checked the libs in ant 1.8.2.
 apparently ant ships with:

 jasper-compiler.version=4.1.36
 jasper-runtime.version=${jasper-compiler.version}

 ..in libraries.properties and you fetch those jars

http://ant.apache.org/manual/Tasks/jspc.html
Deprecated. Nobody uses that.

You should be using the jars that come with Tomcat.

The real docs are here:
http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html



 I think it's early to create a bugzilla entry. Should I look for jasper 
 4.1.36?

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with standard taglibs after precompiling a web app with TCD in 7.0.6 no support for addWebXmlMappings in jasper

2011-01-31 Thread Mark Thomas
On 31/01/2011 14:26, John Bargos wrote:

 I tried to find the jars in tomcat 7.0.6 \lib: there's jasper.jar and
 jasper-el.jar so I'm at a loss to deduce their version, their file
 sizes are very different.

Look in the manifests.

 I think it's early to create a bugzilla entry. Should I look for jasper 
 4.1.36?

That version of Jasper is never going to work with Tomcat 7. You need to
use the Tomcat 7 versions.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with standard taglibs after precompiling a web app with TCD in 7.0.6 no support for addWebXmlMappings in jasper

2011-01-31 Thread John Bargos
On Mon, Jan 31, 2011 at 5:06 PM, Konstantin Kolinko
knst.koli...@gmail.com wrote:
 2011/1/31 John Bargos jbargo...@gmail.com:
 1) I checked the libs in ant 1.8.2.
 apparently ant ships with:

 jasper-compiler.version=4.1.36
 jasper-runtime.version=${jasper-compiler.version}

 ..in libraries.properties and you fetch those jars

 http://ant.apache.org/manual/Tasks/jspc.html
 Deprecated. Nobody uses that.

 You should be using the jars that come with Tomcat.

 The real docs are here:
 http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html



Yeah, I checked that doc b4 starting, I also checked catalina.tasks in
catalina-ant.jar and the new jasper.jar libs in the deployer\lib, so
yesterday I thought the task def was ok and I was ready to compile.

I tried forcibly removing the old jasper jars from ant\lib.. it
doesn't cut it..:

BUILD FAILED
\apache-tomcat-7.0.6-deployer\build.xml:66:
java.lang.NoClassDefFoundError: org/apache/tomcat/JarScannerCa
llback
at org.apache.jasper.JspC.initServletContext(JspC.java:1437)
at org.apache.jasper.JspC.execute(JspC.java:1303)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException:
org.apache.tomcat.JarScannerCallback
at 
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1361)
at 
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
at 
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 25 more

Total time: 0 seconds


Kind regards,

John


 I think it's early to create a bugzilla entry. Should I look for jasper 
 4.1.36?

 Best regards,
 Konstantin Kolinko

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with standard taglibs after precompiling a web app with TCD in 7.0.6 no support for addWebXmlMappings in jasper

2011-01-31 Thread John Bargos
Fixed it,

Apparently this was classpath hell again.

Ant and jasper also need the complete tomcat lib in classpath

2 suggestion for build.xml:

1. Add a property for the base tomcat dir:
property name=tomcat   value=C:/tomcat/

2. Add the /lib path into
a. both in the deployer classpath:

  path id=deployer.classpath
fileset dir=${basedir}/lib
  include name=*.jar/
/fileset

-fileset dir=${tomcat}/lib
-  include name=*.jar/
-/fileset

  /path

b. and into the javac task:

javac destdir=${webapp.path}/WEB-INF/classes
   optimize=off
   debug=${compile.debug}
   deprecation=${compile.deprecation}
   failonerror=false
   srcdir=${webapp.path}/WEB-INF/classes
   encoding=UTF-8
   excludes=**/*.smap
  classpath
fileset dir=${webapp.path}/WEB-INF/lib
  include name=*.jar/
/fileset
fileset dir=${basedir}/lib
  include name=*.jar/
/fileset
-  fileset dir=${tomcat}/lib
-include name=*.jar/
-  /fileset

  /classpath
  include name=** /
  exclude name=tags/** /
/javac

Thanks for all your help!

John



On Mon, Jan 31, 2011 at 5:23 PM, John Bargos jbargo...@gmail.com wrote:
 On Mon, Jan 31, 2011 at 5:06 PM, Konstantin Kolinko
 knst.koli...@gmail.com wrote:
 2011/1/31 John Bargos jbargo...@gmail.com:
 1) I checked the libs in ant 1.8.2.
 apparently ant ships with:

 jasper-compiler.version=4.1.36
 jasper-runtime.version=${jasper-compiler.version}

 ..in libraries.properties and you fetch those jars

 http://ant.apache.org/manual/Tasks/jspc.html
 Deprecated. Nobody uses that.

 You should be using the jars that come with Tomcat.

 The real docs are here:
 http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html



 Yeah, I checked that doc b4 starting, I also checked catalina.tasks in
 catalina-ant.jar and the new jasper.jar libs in the deployer\lib, so
 yesterday I thought the task def was ok and I was ready to compile.

 I tried forcibly removing the old jasper jars from ant\lib.. it
 doesn't cut it..:

 BUILD FAILED
 \apache-tomcat-7.0.6-deployer\build.xml:66:
 java.lang.NoClassDefFoundError: org/apache/tomcat/JarScannerCa
 llback
        at org.apache.jasper.JspC.initServletContext(JspC.java:1437)
        at org.apache.jasper.JspC.execute(JspC.java:1303)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at 
 org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
 Caused by: java.lang.ClassNotFoundException:
 org.apache.tomcat.JarScannerCallback
        at 
 org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1361)
        at 
 org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
        at 
 org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 25 more

 Total time: 0 seconds


 Kind regards,

 John


 I think it's early to create a bugzilla entry. Should I look for jasper 
 4.1.36?

 Best regards,
 Konstantin Kolinko

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





Re: Problem with standard taglibs after precompiling a web app with TCD in 7.0.6 no support for addWebXmlMappings in jasper

2011-01-31 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John,

On 1/31/2011 10:23 AM, John Bargos wrote:
 Yeah, I checked that doc b4 starting, I also checked catalina.tasks in
 catalina-ant.jar and the new jasper.jar libs in the deployer\lib, so
 yesterday I thought the task def was ok and I was ready to compile.

I've been playing with the JSP precompiler in 7.0.x and I'm working on
an ant script that I hope will ship with Tomcat in the future. I'm
including it in it's current form below.

All you need to do is set catalina.home to Tomcat's home directory, set
a compile.classpath for your webapp's libraries (probably WEB-INF/lib
or whatever) and then set whatever jspc.X properties you want to set.

Currently, it will generate a web.xml fragment, but if you set
jspc.jar.file, it will even generate a JAR file that you can drop into
your WEB-INF/lib directory and don't have to do your own web.xml merge.
Cool, right?

A couple of VERY IMPORTANT notes:

1. This is currently experimental and not very flexible. I'm trying to
see what I can get out of the code without modifying it. Keep reading.

2. You need to patch
lib/jasper.jar!org/apache/jasper/resources/LocalStrings.properties like
this (apologies for any wrapping... just read the patch and apply it
manually: it's not that complicated):

 Index: java/org/apache/jasper/resources/LocalStrings.properties
 ===
 --- java/org/apache/jasper/resources/LocalStrings.properties(revision 
 1063336)
 +++ java/org/apache/jasper/resources/LocalStrings.properties(working copy)
 @@ -265,31 +265,32 @@
  \-source version   Set the -source argument to the compiler (default 
 1.6)\n\
  \-target version   Set the -target argument to the compiler (default 
 1.6)\n\
  
 -jspc.webxml.header=?xml version=1.0 encoding=ISO-8859-1?\n\
 +jspc.webxml.header=?xml version=1.0 encoding={0}?\n\
  \n\
 -!DOCTYPE web-app\n\
 -\PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\n\
 -\http://java.sun.com/dtd/web-app_2_3.dtd;\n\
 +web-app xmlns=http://java.sun.com/xml/ns/javaee\n\
 +  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance\n\
 +  xsi:schemaLocation=http://java.sun.com/xml/ns/javaee\n\
 +  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd\n\
 +  version=3.0\n\
  !--\n\
 -Automatically created by Apache Tomcat JspC.\n\
 +Automatically created by Apache Tomcat JspC {1, date, short} {1, time, 
 short}.\n\
  --\n\
  web-app\n\
  \n
  jspc.webxml.footer=\n\
 -/web-app\n\
 -\n
 -jspc.webinc.header=\n\
 +/web-app\n
 +jspc.webinc.header=?xml version=1.0 encoding={0}?\n\
 +\n\
 +web-fragment xmlns=http://java.sun.com/xml/ns/javaee\n\
 +  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance\n\
 +  xsi:schemaLocation=http://java.sun.com/xml/ns/javaee\n\
 +  
 http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd\n\
 +  version=3.0\n\
  !--\n\
 -Automatically created by Apache Tomcat JspC.\n\
 -Place this fragment in the web.xml before all icon, display-name,\n\
 -description, distributable, and context-param elements.\n\
 +Automatically created by Apache Tomcat JspC {1, date, short} {1, time, 
 short}.\n\
  --\n
  jspc.webinc.footer=\n\
 -!--\n\
 -All session-config, mime-mapping, welcome-file-list, error-page, taglib,\n\
 -resource-ref, security-constraint, login-config, security-role,\n\
 -env-entry, and ejb-ref elements should follow this fragment.\n\
 ---\n
 +/web-fragment\n
  jspc.webinc.insertEnd=!-- JSPC servlet mappings end --
  jspc.webinc.insertStart=!-- JSPC servlet mappings start --
  jspc.error.jasperException=error-the file ''{0}'' generated the following 
 parse exception: {1}

3. It's very important that you your uriroot (jsp.source.dir) have a
   WEB-INF/web.xml file that has the correct header in it, or you might
   get strange behavior:

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

4. You saw different code generated by the precompiler and Jasper
   running within Tomcat: that's because within Tomcat, Jasper can
   rely on certain things being available such as tag pools. The
   precompiler apparently does not do tag pooling. Don't worry
   too much about this right now.

Now that you've read all the nastiness, here's the build script:

?xml version=1.0 encoding=UTF-8 ?
!--
 Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless 

Re: Problem with standard taglibs after precompiling a web app with TCD in 7.0.6 no support for addWebXmlMappings in jasper

2011-01-31 Thread Mark Thomas
On 31/01/2011 22:51, Christopher Schultz wrote:
 John,
 
 On 1/31/2011 10:23 AM, John Bargos wrote:
 Yeah, I checked that doc b4 starting, I also checked catalina.tasks in
 catalina-ant.jar and the new jasper.jar libs in the deployer\lib, so
 yesterday I thought the task def was ok and I was ready to compile.
 
 I've been playing with the JSP precompiler in 7.0.x and I'm working on
 an ant script that I hope will ship with Tomcat in the future. I'm
 including it in it's current form below.

You've seen [1] right?

 Currently, it will generate a web.xml fragment, but if you set
 jspc.jar.file, it will even generate a JAR file that you can drop into
 your WEB-INF/lib directory and don't have to do your own web.xml merge.
 Cool, right?

That would be a nice extension to the current script

 4. You saw different code generated by the precompiler and Jasper
running within Tomcat: that's because within Tomcat, Jasper can
rely on certain things being available such as tag pools. The
precompiler apparently does not do tag pooling. Don't worry
too much about this right now.

Huh? -poolingEnabled - defaults to true.

The output should be identical for identical input. It it isn't,
something is broken. With the exception of some white space differences
when I tested 7.0.x a week or so ago the outputs were identical.

Mark

[1]
http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html#Web_Application_Compilation

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Problem with standard taglibs after precompiling a web app with TCD in 7.0.6 no support for addWebXmlMappings in jasper

2011-01-30 Thread John Bargos
Hi,

last week, I was having fun with trivial examples accessing a
datasource with the standard taglibs with success.
Since everything was working perfectly in jsp form and morale was high,
I decided to precompile my web app with TCD and deploy it again in tomcat 7.0.6

I installed ant, fetched dependencies, installed TCD set up the
project's properties and fired ant compile away.

2 questions:

A small problem appeared with addWebXmlMappings=true. apparently ant reported:

\build.xml:67: jasper doesn't support the addWebXmlMappings attribute

Apparently ant 1.8.2 with all dependencies fetched *today* isn't enough?

Bypassing this problem by manually merging the servlet mappings from
generated_web.xml to web.xml and deploying, I get an exception when
accessing my page:

java.lang.NullPointerException
    at org.apache.jasper.runtime.
TagHandlerPool.get(TagHandlerPool.java:106)
    at index_jsp._jspx_meth_sql_query_0(Unknown Source)
    at index_jsp._jspService(Unknown Source)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:550)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:380)
    at 
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:284)
    at 
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:322)
    at 
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1684)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

I'm using:

apache-ant-1.8.2
jakarta-taglibs-standard-1.1.2
apache-tomcat-7.0.6-deployer
apache-tomcat-7.0.6

2 libs for the tags: in \WEB-INF\lib
jstl.jar
standard.jar

my toned down index.jsp is very simple:


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

head
titleZend page./title
/head
body
p align=centerfont color=#FF size=6%=Zend%/font/p

sql:query var = users dataSource=zoomla
select * from zend_users;
/sql:query

table border=1
c:forEach var=row items=${users.rows}
tr
tdc:out value=${row.idkp}//td
tdc:out value=${row.login}//td
tdc:out value=${row.password}//td
/tr
/c:forEach
/table
/body
/html

the web.xml is pretty spartan as well:

?xml version=1.0 encoding=ISO-8859-1?
web-app version=3.0

  display-namedatasource fun/display-name
  description
    datasource fun
  /description

    servlet
        servlet-nameindex_jsp/servlet-name
        servlet-classindex_jsp/servlet-class
    /servlet

    servlet-mapping
        servlet-nameindex_jsp/servlet-name
        url-pattern/index.jsp/url-pattern
    /servlet-mapping

resource-ref
 descriptionpostgreSQL Datasource fun/description
 res-ref-namejdbc/postgres/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref
/web-app

so what's going on here? any pointers? looks like google is my enemy
on this one :(

Your input and help is much appreciated,

John

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



[BSF,Tomcat] ad JSR-223 taglib for Tomcat ... (Re: Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2010-08-04 Thread Rony G. Flatscher (Apache)
Resending attempt.


Hi Henri,

relating to our conversation of last fall, I just wanted to point out
that Mr. Ryabenkiy posts of today (copied at the end to inform the
BSF-community) fulfills the idea of creating a jsr-223 taglib for Tomcat.

He applies the Apache License 2.0 to his work, such that it can be taken
on by ASF.

The Quercus/Resin
http://www.caucho.com/resin-3.0/quercus/tutorial/module/index.xtp
package Mr. Ryabenkiy refers to is used in his work as proof of concept
to use PHP scripts in Tomcat served JSP (which might be quite
interesting for PHP-acquantied programmers, who have no expert knowledge
of Java) !
(He also uses the scripting language ooRexx as a proof of concept for
which he wrote a JSR-223 engine.)

In effect all scripting languages can be used, that adhere to Java 6
scripting a.k.a. JSR-223 with his taglib to create scripts for JSP. It
would even be possible to use multiple scripts in different languages
for the same JSP.

It will (again) allow for JSP and Java what ASP allows for the MS world.

---rony



On 13.10.2009 08:17, Rony G. Flatscher (Apache) wrote:
 Henri Yandell wrote:
   
 Not sure where Christopher's email was, but:

 If there is any interest in a retired taglib, I'm all for it being
 merged into the Extended Taglib. Currently I plan to consider
 replacing the functionality from String Taglib (mostly as EL
 functions), Log Taglib and JNDI Taglib (perhaps).

 It sounds like BSF taglib, given it has only the two tags, might be
 very interesting if a dependency on BSF itself can be avoided (ie:
 base it on javax.script).
   
 
 +1

 If you include just the taglib (the JSR-223 to be created), then its
 usage would be restricted to Java 6 and up, such that current Java 1.4
 and 1.5 installations in the field could not take advantage of it.

 To cover Java 1.4 and 1.5 BSF 3.0 got created, which implements the
 javax.script specifications. If BSF 3.0 is included then the scripting
 support will be available from Java 1.4 on. Starting with Java 6 the
 Java 6 javax.script would prevail due to using its own package by
 placement of the classes.

 ---rony


 cut here, Mr. Ryabenskiy post of 2010-08-04
--
 Original Message 
Subject:New taglib to script JSP pages in languages other than Java
Date:   Wed, 4 Aug 2010 09:49:20 +0200
From:   Stanislav Ryabenkiy stani.ryaben...@gmail.com
To: taglibs-u...@tomcat.apache.org, d...@tomcat.apache.org



Hello,

as I haven't posted here before, I hope I won't make a mistake by
posting to both of these lists. IMHO, this announcement is relevant to
both communities.

This is to inform the taglibs-user and tomcat-dev communities of a
small new taglib which allows to script JSP pages in laqnguages other
than Java. Scriptlets and expressions using the taglib have access to
the same implicit objects normal JSP scriptlets have access to.
Internally, the taglib only depends on the javax.script interface
defined as part of JSR-223 and included in Java 6 onwards, although it
can also work with other implementations of javax.script on earlier
version of Java (such as, for instance, Bean Scripting Framework 3).
So for people who want to include scripts in their JSP pages, any
scripting language that exposes a javax.script interface can be used.

Given the nature of the project, and the existence of partial
alternatives at least for some languages (such as Quercus/Resin), I
expect interest to be quite small (if any), but if there's any
interest it could be included in the newly re-organized Extended
Taglib. Ideally, I would want Tomcat to support this kind of
functionality natively via the language attribute of the page
directive, but the taglib at least offers a simpler and
container-independent solution.

Source code can be found at:
http://stani.ryabenkiy.com/downloads/releases/script-taglib-1.0.tar.gz
The related thesis paper (with source code in appendix):
http://stani.ryabenkiy.com/downloads/papers/scripting_thesis.pdf

Kind Regards,
Stani




Re: Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2009-10-13 Thread Rony G. Flatscher (Apache)

Henri Yandell wrote:
 Not sure where Christopher's email was, but:

 If there is any interest in a retired taglib, I'm all for it being
 merged into the Extended Taglib. Currently I plan to consider
 replacing the functionality from String Taglib (mostly as EL
 functions), Log Taglib and JNDI Taglib (perhaps).

 It sounds like BSF taglib, given it has only the two tags, might be
 very interesting if a dependency on BSF itself can be avoided (ie:
 base it on javax.script).
   
+1

If you include just the taglib (the JSR-223 to be created), then its
usage would be restricted to Java 6 and up, such that current Java 1.4
and 1.5 installations in the field could not take advantage of it.

To cover Java 1.4 and 1.5 BSF 3.0 got created, which implements the
javax.script specifications. If BSF 3.0 is included then the scripting
support will be available from Java 1.4 on. Starting with Java 6 the
Java 6 javax.script would prevail due to using its own package by
placement of the classes.

---rony




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2009-10-11 Thread Rony G. Flatscher (Apache)
Christopher,

thanks for your information!

  AFAIK the BSF taglib has been allowing one to add code in all of the
  BSF supported scripting languages to JSPs. Not knowing, wheter there
  are alternatives available in the current Tomcat

 Tomcat itself contains little in the way of tag libraries, except for
 the JSTL required by the JSP 2.1 specification (and higher).

  In case the BSF taglib is needed for adding scripts in scripting
  languages to JSPs, I would kindly suggest to not retire it, but to
  keep it available for interested parties in the Tomcat realm.

 So, let me clear a few things up:

 1. The Tomcat team didn't retire the BSF tag library. The Jakarta BSF
 tag library folks retired it. You should complain to them.
They are all off (enjoying retirement) ...
;-)

 2. The Apache Software Foundation (ASF) never deletes code forever. Just
 because it's retired doesn't mean it's no longer available: it just
 means that they will no longer be maintaining it by adding features,
 fixing bugs, or answering questions about it.
Yes, but the semantics of retirement indicates that they go out of
service (are not useful in todays world anymore).

 Note that the jakarta-taglibs-BSF project hadn't had a news announcement
 since 2002, so it was pretty much already dead.
Yes, but does that mean it is not useful anymore, needs to get retired,
has become irrelevant?

In this particular case it is just a sign that this particular
functionality has become stable and there has not been a need to add new
functionality (what functionality would have been needed in this taglib,
other than enabling scripting languages to become usable to create
scripts embedded in JSPs) ?

Coming from BSF (which BSF taglib exploits) it is not clear to me,
whether Tomcat users have been exploiting this taglib or not (actually,
if it gets retired, this means that either the taglib is not needed
anymore, because of an alternative technology put in place, or the
taglib has not been exploited, used at all).

  In case there are alternatives available in Tomcat to the BSF taglib,
  please be so kind and point them out (just short pointers would
  suffice!).

 What is it that you are trying to do, exactly? It's possible that simply
 using the BSF library directly (without a tag library) is your best
 option. There was a fad for a while where everything was being wrapped
 into a tag library and JSP was starting to look like ColdFusion. CF was
 eventually re-implemented in Java using JSP tag libraries so I guess JSP
 had the last laugh.

 I never thought non-UI-related tag libraries had any business existing
 because I firmly believe in separation between model/controller and
 view: the view simply should not be sending emails, communicating with
 databases (at least not directly), sending JMS messages, or copying
 files around.
E.g. if you look into the MS world you will immediately stumble over
tons of ASPs which employ tons (even a mix) of scripting languages.
Scripting languages in that world empower even end-user kind of
programmers to quickly and easily insert code in a language they can
master for web-based applications (and again, they take advantage of
that possibility). (There are more reasons, arguments, why it may
actually make sense to allow scripting languages to be used in server
pages, of cours.)

Also, experts in once scripting language are enabled to apply their
knowledge for Web apps by creating the needed logic in their scripting
language for server pages, removing the need for them to learn a new
programming language. (Again, there are other good reasons as well.)

 If you want to use another scripting language to generate content, then
 why bother with JSP in the first place? Why not use a tool geared
 towards allowing you to use your scripting-language of choice outside of
 a JSP context?
This would lead to environments that lock-in the developers in specific
environments, which only are available for themselves (cf. PHP, Ruby,
etc. environments). Having an established and proven environment
available, like Tomcat, making it possible to mix-in code in scripting
languages, would be a boon.

If it is possible to include script code into JSPs, then why not allow
for that? The BSF taglib would allow for that, making it possible to
mix-and-match all supported scripting languages in JSPs. (And again,
there may be many different reasons for doing that.)

---

Having said all that I would like to make sure that I have no intentions
to run (or start) a war of opinions. It is o.k. with me if I learn
that currently in Tomcat this functionality is not really seen as a
benefit for Tomcat (hence not taking over the BSF taglib, but instead
letting it retire).

---rony

P.S.: As long as the BSF taglib can be used with Tomcat, users who have
a need to use scripts in JSPs will be able to do so (if they know that
this is possible exists in the first place).

P.P.S.: Also in the controller (citing your MVC argument above) you
could use

Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2009-10-09 Thread Rony G. Flatscher (Apache)
Hi there,

not sure whether this is a user or dev question, hence sending it to
both, please forgive, if wrong.

Learning about the finalization of moving taglib from jakarta to tomcat,
one could also learn that the BSF taglib got retired in the process.
AFAIK the BSF taglib has been allowing one to add code in all of the BSF
supported scripting languages to JSPs. Not knowing, wheter there are
alternatives available in the current Tomcat (did a coarse research on
that issue, but did not find any info on this) I created the enclosed
e-mail to the BSF user and dev list to make sure, that users of the BSF
taglib learn about where it has moved to, in case it is still needed.

In case the BSF taglib is needed for adding scripts in scripting
languages to JSPs, I would kindly suggest to not retire it, but to keep
it available for interested parties in the Tomcat realm. In case there
are alternatives available in Tomcat to the BSF taglib, please be so
kind and point them out (just short pointers would suffice!).

TIA,

---rony

P.S.: If the BSF taglib is still needed, then one more (dev) point to
discuss/raise would be to create in a addition a new JSR-223/BSF3 taglib
for the newly released BSF 3.0, which implements the JSR-223
(javax.script) specs. Unlike JSR-223, which is only available starting
with Java 6, BSF 3 supplies the same functionality for Java 1.4
installations or higher, making it a very attractive technology for Java
1.4 and 1.5 installations, as they gain the standard scripting APIs with
it. There would be more to this, but should only be discussed, if a need
for this exists.


 Original Message 
Subject:In the move of some taglibs to Tomcat, the BSF taglib got 
retired
Date:   Fri, 09 Oct 2009 12:18:31 +0200
From:   Rony G. Flatscher rony.flatsc...@wu-wien.ac.at
Reply-To:   Bean Scripting Framework developers bsf-...@jakarta.apache.org
To: Bean Scripting Framework developers bsf-...@jakarta.apache.org,
Bean Scripting Framework users bsf-u...@jakarta.apache.org



Hi there,

just learned from the announcement that in the process of moving taglibs
from Jakarta to Tomcat a lot of taglibs got retired, among them the BSF
taglib.

Not sure at the moment how Tomcat will allow for creating JSPs that
embed code in scripting languages, which was one of the original
applications of BSF, when it was originally developed at IBM (as a
matter of fact, IBM's WebSphere distributed BSF in order to enable Java
Server Page authors to embed scripts in any of its supported scripting
languages, very much like MS allows for in their ASPs).

So for those who have a need for the BSF taglib, here the relevant links:

Information about BSF taglib and examples on how to use it:

http://jakarta.apache.org/taglibs/doc/bsf-doc/

Download BSF taglib from:

http://svn.apache.org/repos/asf/jakarta/taglibs/deprecated/bsf/trunk/

Retired taglibs as of 2009-10:

http://jakarta.apache.org/site/retired-taglibs.html

---rony





Re: Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2009-10-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rony,

On 10/9/2009 7:30 AM, Rony G. Flatscher (Apache) wrote:
 Learning about the finalization of moving taglib from jakarta to
 tomcat, one could also learn that the BSF taglib got retired in the
 process.

Yup.

 AFAIK the BSF taglib has been allowing one to add code in all of the
 BSF supported scripting languages to JSPs. Not knowing, wheter there
 are alternatives available in the current Tomcat

Tomcat itself contains little in the way of tag libraries, except for
the JSTL required by the JSP 2.1 specification (and higher).

 In case the BSF taglib is needed for adding scripts in scripting 
 languages to JSPs, I would kindly suggest to not retire it, but to
 keep it available for interested parties in the Tomcat realm.

So, let me clear a few things up:

1. The Tomcat team didn't retire the BSF tag library. The Jakarta BSF
tag library folks retired it. You should complain to them.

2. The Apache Software Foundation (ASF) never deletes code forever. Just
because it's retired doesn't mean it's no longer available: it just
means that they will no longer be maintaining it by adding features,
fixing bugs, or answering questions about it.

Note that the jakarta-taglibs-BSF project hadn't had a news announcement
since 2002, so it was pretty much already dead.

 In case there are alternatives available in Tomcat to the BSF taglib,
 please be so kind and point them out (just short pointers would
 suffice!).

What is it that you are trying to do, exactly? It's possible that simply
using the BSF library directly (without a tag library) is your best
option. There was a fad for a while where everything was being wrapped
into a tag library and JSP was starting to look like ColdFusion. CF was
eventually re-implemented in Java using JSP tag libraries so I guess JSP
had the last laugh.

I never thought non-UI-related tag libraries had any business existing
because I firmly believe in separation between model/controller and
view: the view simply should not be sending emails, communicating with
databases (at least not directly), sending JMS messages, or copying
files around.

If you want to use another scripting language to generate content, then
why bother with JSP in the first place? Why not use a tool geared
towards allowing you to use your scripting-language of choice outside of
a JSP context?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrPpJQACgkQ9CaO5/Lv0PCu7QCfSsq5a606rBek1te/912L5P5B
pNoAnjg/w9EeYHoV7/yr43udCuNa7NRp
=ImL8
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



servlet spec, taglibs, java sdk - which ones?

2008-02-06 Thread Leo Donahue - PLANDEVX
Looking here: http://tomcat.apache.org/whichversion.html - no problems,
except we run Tomcat 5.0.28 and reading below in the site it says 
 
quote
Apache Tomcat 5.5.x. It supports the same Servlet and JSP Specification
versions as Apache Tomcat 5.0.x,
/quote
 
Which is what servlet spec version?
 
I've figured out the taglib question:
http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
 
Standard 1.1 is at least servlet 2.4 and Standard 1.0 is servlet 2.3
 
I downloaded the Standard 1.1 taglibs from here:
http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
 
I'm reading the text from Oreily Java Server Pages and I'm trying to
produce a jsp page using standard jsp:set/get actions, but I get an
error message which I'm sure means I have the wrong taglib downloaded,
or does it mean something else?
 
javax.servlet.ServletException: Employee (Unsupported major.minor
version 50.0)
 
 
 
Leo Donahue
 


Re: servlet spec, taglibs, java sdk - which ones?

2008-02-06 Thread David Smith
There's a very nice table right on the home page for tomcat letting you 
know what tomcat version supports what spec -- http://tomcat.apache.org/


--David

Leo Donahue - PLANDEVX wrote:


Looking here: http://tomcat.apache.org/whichversion.html - no problems,
except we run Tomcat 5.0.28 and reading below in the site it says 


quote
Apache Tomcat 5.5.x. It supports the same Servlet and JSP Specification
versions as Apache Tomcat 5.0.x,
/quote

Which is what servlet spec version?

I've figured out the taglib question:
http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

Standard 1.1 is at least servlet 2.4 and Standard 1.0 is servlet 2.3

I downloaded the Standard 1.1 taglibs from here:
http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi

I'm reading the text from Oreily Java Server Pages and I'm trying to
produce a jsp page using standard jsp:set/get actions, but I get an
error message which I'm sure means I have the wrong taglib downloaded,
or does it mean something else?

javax.servlet.ServletException: Employee (Unsupported major.minor
version 50.0)



Leo Donahue


 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: servlet spec, taglibs, java sdk - which ones?

2008-02-06 Thread Caldarale, Charles R
 From: Leo Donahue - PLANDEVX [mailto:[EMAIL PROTECTED] 
 Subject: servlet spec, taglibs, java sdk - which ones?
 
 quote
 Apache Tomcat 5.5.x. It supports the same Servlet and JSP 
 Specification
 versions as Apache Tomcat 5.0.x,
 /quote
  
 Which is what servlet spec version?

The one boldly displayed in the table on the Tomcat main page:
http://tomcat.apache.org/

 javax.servlet.ServletException: Employee (Unsupported major.minor
 version 50.0)

You're trying to use a .class file built with a 1.6 JDK on a 1.5 JVM.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: servlet spec, taglibs, java sdk - which ones?

2008-02-06 Thread Leo Donahue - PLANDEVX
Yes I saw that, and like I mentioned in my email, I don't run Tomcat
5.5.x, I'm stuck using Tomcat 5.0.28
That table doesn't mention what spec Tomcat 5.0.x uses.  Does it mean
any version from 4.1.36 to 5.5.25 uses servlet spec 2.3 ?

Leo Donahue

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 06, 2008 9:08 AM
To: Tomcat Users List
Subject: Re: servlet spec, taglibs, java sdk - which ones?

There's a very nice table right on the home page for tomcat letting you
know what tomcat version supports what spec -- http://tomcat.apache.org/

--David

Leo Donahue - PLANDEVX wrote:

Looking here: http://tomcat.apache.org/whichversion.html - no problems,

except we run Tomcat 5.0.28 and reading below in the site it says
 
quote
Apache Tomcat 5.5.x. It supports the same Servlet and JSP Specification

versions as Apache Tomcat 5.0.x, /quote
 
Which is what servlet spec version?
 
I've figured out the taglib question:
http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
 
Standard 1.1 is at least servlet 2.4 and Standard 1.0 is servlet 2.3
 
I downloaded the Standard 1.1 taglibs from here:
http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
 
I'm reading the text from Oreily Java Server Pages and I'm trying to 
produce a jsp page using standard jsp:set/get actions, but I get an 
error message which I'm sure means I have the wrong taglib downloaded, 
or does it mean something else?
 
javax.servlet.ServletException: Employee (Unsupported major.minor 
version 50.0)
 
 
 
Leo Donahue
 

  



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multithreaded with taglibs

2007-11-29 Thread ben short
Do you really need to use tomcat to do this? Maybe you should take a
step back and rethink what your trying to achieve.

On Nov 29, 2007 10:14 AM, Yair Ben-Meir [EMAIL PROTECTED] wrote:
 Let me try another scenario: let say that the generated text for the out
 is not one iamge, but some number between 0 and 5. the correct number of
 images will be clear only after the execution of the thread. In this case, I
 do want to continue with the JSP and write to the out later on.
 The only think I thought of was to write something like {1} (instead of
 tag) and when the page is over it will replace {1} with the right code
 from the thread. This will require me to get the generated page from the JSP
 and manipulate it after Jasper has finished with it.
 Any better way to do it?

 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 28, 2007 7:04 PM
 To: Tomcat Users List
 Subject: Re: multithreaded with taglibs


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Yair,

 Yair Ben-Meir wrote:
  This solution is good but we must write to the out of the jsp before the
  thread is running (we bypass this because the thread will write to a
  pre-decided file name). is there another way to do it, without writing to
  the out?

 I'm not sure I understand what you mean. Are you asking how to continue
 evaluating the JSP while the image is being generated? Easy. Create a
 class like this:

 public class ParallelImageGenerator
 {
 public ParallelImageGenerator() { ... }

 public String getGeneratedFilename() { ... }

 public void start() { ... }
 public void wait() { ... }
 }

 Then, from your tagStart method in your custom tag library, do something
 like this:

 pig = new ParallelImageGenerator();
 pig.start();

 jspOut.print(img src=\ + pig.getGeneratedFilename() + \ /);

 // Register the 'pig' object somewhere so you can go back and wait
 // on all of the image generators.

 - -chris

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iD8DBQFHTZ9n9CaO5/Lv0PARAkxKAKCP/PK410pUbBTrWxS9G5fIhE6aYgCfb6dJ
 0RnxBh6+CfToeccD3lgS/6M=
 =Iksk
 -END PGP SIGNATURE-

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multithreaded with taglibs

2007-11-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yair,

Yair Ben-Meir wrote:
 Let me try another scenario: let say that the generated text for the out
 is not one iamge, but some number between 0 and 5. the correct number of
 images will be clear only after the execution of the thread. In this case, I
 do want to continue with the JSP and write to the out later on.
 The only think I thought of was to write something like {1} (instead of
 tag) and when the page is over it will replace {1} with the right code
 from the thread. This will require me to get the generated page from the JSP
 and manipulate it after Jasper has finished with it.

This will require you to write a body tag (or whatever they're
called). I haven't written a tag library in 7 years. :(

Basically, you'll have to keep all the template content somewhere so you
can manipulate it /after/ the threads are done, but before the output is
written. Using a wrapper tag (like parallelimgimgimg/parallel)
will help here because you can collect all the jobs to be done (each img
is a job), run them all in parallel, wait for them all to finish, and
then generate all the relevant (real) content to the output stream.

Another option is to simply do all this work before you start generating
any output, which would be my preference. Have the request invoke a
servlet that does everything and then writes the output using JSP. Much
easier and cleaner, which is why it's been the recommended technique
since two days after JSP was invented.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTuq49CaO5/Lv0PARAtouAKCq4/Fl/+MEsXILwECGVMQ4QyqP1ACgjFTG
qSxP8arHfrjmAbj+CHEtns4=
=ohP6
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: multithreaded with taglibs

2007-11-28 Thread Yair Ben-Meir
Sorry chris, I didn't understand u then... it is a good solution (great
minds think alike!).

This solution is good but we must write to the out of the jsp before the
thread is running (we bypass this because the thread will write to a
pre-decided file name). is there another way to do it, without writing to
the out?
I guess not, I m just checking that I m not missing something.

Thanks
Yair


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 27, 2007 6:17 PM
To: Tomcat Users List
Subject: Re: multithreaded with taglibs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yair,

Yair Ben-Meir wrote:
 Btw - i thought of something: maybe the img tag will run a thread, return
an
 outout to the page with some new image name, and release the jsp to
 continue. The thread will do the work and save the new image under the
name
 the tag returned to the page. At the end of the page, a wait tag will be
 for waiting to whole of the threads to finish. That's the best thing I
 thought of till now.

That's exactly what I was suggesting.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTELo9CaO5/Lv0PARAg3oAJ45nSggqD5/U92iGMUX8ZqexbMhNACgv3lD
Oun0j/lB3Xa2CmnTVrC14BM=
=uTJw
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multithreaded with taglibs

2007-11-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yair,

Yair Ben-Meir wrote:
 This solution is good but we must write to the out of the jsp before the
 thread is running (we bypass this because the thread will write to a
 pre-decided file name). is there another way to do it, without writing to
 the out?

I'm not sure I understand what you mean. Are you asking how to continue
evaluating the JSP while the image is being generated? Easy. Create a
class like this:

public class ParallelImageGenerator
{
public ParallelImageGenerator() { ... }

public String getGeneratedFilename() { ... }

public void start() { ... }
public void wait() { ... }
}

Then, from your tagStart method in your custom tag library, do something
like this:

pig = new ParallelImageGenerator();
pig.start();

jspOut.print(img src=\ + pig.getGeneratedFilename() + \ /);

// Register the 'pig' object somewhere so you can go back and wait
// on all of the image generators.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTZ9n9CaO5/Lv0PARAkxKAKCP/PK410pUbBTrWxS9G5fIhE6aYgCfb6dJ
0RnxBh6+CfToeccD3lgS/6M=
=Iksk
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multithreaded with taglibs

2007-11-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yair,

Yair Ben-Meir wrote:
 Btw - i thought of something: maybe the img tag will run a thread, return an
 outout to the page with some new image name, and release the jsp to
 continue. The thread will do the work and save the new image under the name
 the tag returned to the page. At the end of the page, a wait tag will be
 for waiting to whole of the threads to finish. That's the best thing I
 thought of till now.

That's exactly what I was suggesting.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTELo9CaO5/Lv0PARAg3oAJ45nSggqD5/U92iGMUX8ZqexbMhNACgv3lD
Oun0j/lB3Xa2CmnTVrC14BM=
=uTJw
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: multithreaded with taglibs

2007-11-26 Thread David Cassidy
Errr 

how will you allow people to access the file over the internet with a
file:// protocol ?

are you only running the app and the users browser on the same machine ?

file://C:\My Documents\image.gif 

?

Can't see that working over the internet


On Sun, 2007-11-25 at 13:56 +0200, Yair Ben-Meir wrote:
 Thanks, but that's not good for me, I need the page to be with a real file
 link (file://), not through a servlet.
 
 
 -Original Message-
 From: Pid [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, November 25, 2007 11:53 AM
 To: Tomcat Users List
 Subject: Re: multithreaded with taglibs
 
 Yair Ben-Meir wrote:
  Let say that the tag will have to generate the image with a text given as
 an
  attribute, and it takes time so I want the page to continue:
  
  my:img src=file text=first/
  
  .
  
  my:img src=file text=first/
 
 Why are you doing this with a tag, rather than sending the parameter to
 a servlet that serves an image into it's output stream?
 
 You exploit the browsers own request handling capabilities this way.
 
 img src=/img-app/generate?param1=some+text+here alt=an image /
 
 
 p
 
 
 
  -Original Message-
  From: David Cassidy [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, November 22, 2007 6:08 PM
  To: Tomcat Users List
  Subject: Re: multithreaded with taglibs
  
  Hi
  
  What is your tag going to produce ?
  is it an IMG SRC=. type tag ?
  
  or how are you allowing the browser to access the image ?
  
  Ta
  
  D
  
  On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
  Hi
 
  Is there a way to write a taglib that will do a multithreading work?
  Meaning, that tomcatwill not wait till the first instance of the tag
  will end, and continue to the rest of the page, and maybe start with
  another instance, and than it will insert the result of each instance
  in the right place?
 
   
 
  Example:
 
  my:img name=/
 
  .
 
  my:img name=/
 
   
 
  And let say that each my:img is supposed to download the image and
  save it locally or something like that, and I don't want tomcat to
  wait till the first tag is finished.
 
   
 
   
 
  Thanks
 
   
 
   
 
  Yair Ben-Meir
 
   
 
  Office: 073-7997801
 
  Fax: 073-7997800
 
  Mob:   054-5769681
 
 
 
   
 
 
  
  
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multithreaded with taglibs

2007-11-26 Thread ben short
Yair,

I created a eshop website that dynamically re sizes images depending
on the url. Here is a simple outline of what happens.

A new product is created by the shop admin. Images are then uploaded
and stored in a database in the uploaded size.

When a product page is viewed the controller ( im using spring ) pulls
the product object from the db and passes it to the view, a jsp page.

The jsp then generates a image tag as show below.

img width=175px name=mainImage
src=productimages/69_s_medium.jpg title=Kitchen Stove and
Utensils/

The browser then renders the page, when it finds a image tag it then
uses another thread to load the image. this is standard browser
behavior.

The productimages url is mapped to another controller, that parses the
url. The first part of the url is the image id, the next part is tells
it that the part after that is a size rather than a dimension. The
controller knows the expected dimensions for a medium image.

The controller then pulls the image from the db and resizes it before
sending it to the browser. The controller is actually smarter than
that, and does on disk caching of resized images and check the last
mod time, but i wont detail that here.

So what is happening here is the browser is rendering the html created
by the jsp page and then making another request to get the images,
which is then making tomcat use another thread to generate the image.
Sound like what your trying to achieve?

Ben

On Nov 26, 2007 10:15 AM, David Cassidy [EMAIL PROTECTED] wrote:
 Errr

 how will you allow people to access the file over the internet with a
 file:// protocol ?

 are you only running the app and the users browser on the same machine ?

 file://C:\My Documents\image.gif

 ?

 Can't see that working over the internet



 On Sun, 2007-11-25 at 13:56 +0200, Yair Ben-Meir wrote:
  Thanks, but that's not good for me, I need the page to be with a real file
  link (file://), not through a servlet.
 
 
  -Original Message-
  From: Pid [mailto:[EMAIL PROTECTED]
  Sent: Sunday, November 25, 2007 11:53 AM
  To: Tomcat Users List
  Subject: Re: multithreaded with taglibs
 
  Yair Ben-Meir wrote:
   Let say that the tag will have to generate the image with a text given as
  an
   attribute, and it takes time so I want the page to continue:
  
   my:img src=file text=first/
  
   .
  
   my:img src=file text=first/
 
  Why are you doing this with a tag, rather than sending the parameter to
  a servlet that serves an image into it's output stream?
 
  You exploit the browsers own request handling capabilities this way.
 
  img src=/img-app/generate?param1=some+text+here alt=an image /
 
 
  p
 
 
 
   -Original Message-
   From: David Cassidy [mailto:[EMAIL PROTECTED]
   Sent: Thursday, November 22, 2007 6:08 PM
   To: Tomcat Users List
   Subject: Re: multithreaded with taglibs
  
   Hi
  
   What is your tag going to produce ?
   is it an IMG SRC=. type tag ?
  
   or how are you allowing the browser to access the image ?
  
   Ta
  
   D
  
   On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
   Hi
  
   Is there a way to write a taglib that will do a multithreading work?
   Meaning, that tomcatwill not wait till the first instance of the tag
   will end, and continue to the rest of the page, and maybe start with
   another instance, and than it will insert the result of each instance
   in the right place?
  
  
  
   Example:
  
   my:img name=/
  
   .
  
   my:img name=/
  
  
  
   And let say that each my:img is supposed to download the image and
   save it locally or something like that, and I don't want tomcat to
   wait till the first tag is finished.
  
  
  
  
  
   Thanks
  
  
  
  
  
   Yair Ben-Meir
  
  
  
   Office: 073-7997801
  
   Fax: 073-7997800
  
   Mob:   054-5769681
  
  
  
  
  
  
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL

RE: multithreaded with taglibs

2007-11-26 Thread Yair Ben-Meir
You're right about that - it is not for using over the web. Anyway, that's
just an example. The main issue is to run the work of the tag in a thread
without making the rest of the page wait.

-Original Message-
From: David Cassidy [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 26, 2007 12:15 PM
To: Tomcat Users List
Subject: RE: multithreaded with taglibs

Errr 

how will you allow people to access the file over the internet with a
file:// protocol ?

are you only running the app and the users browser on the same machine ?

file://C:\My Documents\image.gif 

?

Can't see that working over the internet


On Sun, 2007-11-25 at 13:56 +0200, Yair Ben-Meir wrote:
 Thanks, but that's not good for me, I need the page to be with a real file
 link (file://), not through a servlet.
 
 
 -Original Message-
 From: Pid [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, November 25, 2007 11:53 AM
 To: Tomcat Users List
 Subject: Re: multithreaded with taglibs
 
 Yair Ben-Meir wrote:
  Let say that the tag will have to generate the image with a text given
as
 an
  attribute, and it takes time so I want the page to continue:
  
  my:img src=file text=first/
  
  .
  
  my:img src=file text=first/
 
 Why are you doing this with a tag, rather than sending the parameter to
 a servlet that serves an image into it's output stream?
 
 You exploit the browsers own request handling capabilities this way.
 
 img src=/img-app/generate?param1=some+text+here alt=an image /
 
 
 p
 
 
 
  -Original Message-
  From: David Cassidy [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, November 22, 2007 6:08 PM
  To: Tomcat Users List
  Subject: Re: multithreaded with taglibs
  
  Hi
  
  What is your tag going to produce ?
  is it an IMG SRC=. type tag ?
  
  or how are you allowing the browser to access the image ?
  
  Ta
  
  D
  
  On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
  Hi
 
  Is there a way to write a taglib that will do a multithreading work?
  Meaning, that tomcatwill not wait till the first instance of the tag
  will end, and continue to the rest of the page, and maybe start with
  another instance, and than it will insert the result of each instance
  in the right place?
 
   
 
  Example:
 
  my:img name=/
 
  .
 
  my:img name=/
 
   
 
  And let say that each my:img is supposed to download the image and
  save it locally or something like that, and I don't want tomcat to
  wait till the first tag is finished.
 
   
 
   
 
  Thanks
 
   
 
   
 
  Yair Ben-Meir
 
   
 
  Office: 073-7997801
 
  Fax: 073-7997800
 
  Mob:   054-5769681
 
 
 
   
 
 
  
  
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: multithreaded with taglibs

2007-11-26 Thread Yair Ben-Meir
Hi ben
Thanks for your idea. In my case, I can't use it, since the generated img
tag must be a static file (a file: url) and not a link to a servlet. That's
why the processing must be when generating the html.
Thanks
Yair


-Original Message-
From: ben short [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 26, 2007 1:19 PM
To: Tomcat Users List
Subject: Re: multithreaded with taglibs

Yair,

I created a eshop website that dynamically re sizes images depending
on the url. Here is a simple outline of what happens.

A new product is created by the shop admin. Images are then uploaded
and stored in a database in the uploaded size.

When a product page is viewed the controller ( im using spring ) pulls
the product object from the db and passes it to the view, a jsp page.

The jsp then generates a image tag as show below.

img width=175px name=mainImage
src=productimages/69_s_medium.jpg title=Kitchen Stove and
Utensils/

The browser then renders the page, when it finds a image tag it then
uses another thread to load the image. this is standard browser
behavior.

The productimages url is mapped to another controller, that parses the
url. The first part of the url is the image id, the next part is tells
it that the part after that is a size rather than a dimension. The
controller knows the expected dimensions for a medium image.

The controller then pulls the image from the db and resizes it before
sending it to the browser. The controller is actually smarter than
that, and does on disk caching of resized images and check the last
mod time, but i wont detail that here.

So what is happening here is the browser is rendering the html created
by the jsp page and then making another request to get the images,
which is then making tomcat use another thread to generate the image.
Sound like what your trying to achieve?

Ben

On Nov 26, 2007 10:15 AM, David Cassidy [EMAIL PROTECTED] wrote:
 Errr

 how will you allow people to access the file over the internet with a
 file:// protocol ?

 are you only running the app and the users browser on the same machine ?

 file://C:\My Documents\image.gif

 ?

 Can't see that working over the internet



 On Sun, 2007-11-25 at 13:56 +0200, Yair Ben-Meir wrote:
  Thanks, but that's not good for me, I need the page to be with a real
file
  link (file://), not through a servlet.
 
 
  -Original Message-
  From: Pid [mailto:[EMAIL PROTECTED]
  Sent: Sunday, November 25, 2007 11:53 AM
  To: Tomcat Users List
  Subject: Re: multithreaded with taglibs
 
  Yair Ben-Meir wrote:
   Let say that the tag will have to generate the image with a text given
as
  an
   attribute, and it takes time so I want the page to continue:
  
   my:img src=file text=first/
  
   .
  
   my:img src=file text=first/
 
  Why are you doing this with a tag, rather than sending the parameter to
  a servlet that serves an image into it's output stream?
 
  You exploit the browsers own request handling capabilities this way.
 
  img src=/img-app/generate?param1=some+text+here alt=an image /
 
 
  p
 
 
 
   -Original Message-
   From: David Cassidy [mailto:[EMAIL PROTECTED]
   Sent: Thursday, November 22, 2007 6:08 PM
   To: Tomcat Users List
   Subject: Re: multithreaded with taglibs
  
   Hi
  
   What is your tag going to produce ?
   is it an IMG SRC=. type tag ?
  
   or how are you allowing the browser to access the image ?
  
   Ta
  
   D
  
   On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
   Hi
  
   Is there a way to write a taglib that will do a multithreading work?
   Meaning, that tomcatwill not wait till the first instance of the tag
   will end, and continue to the rest of the page, and maybe start with
   another instance, and than it will insert the result of each instance
   in the right place?
  
  
  
   Example:
  
   my:img name=/
  
   .
  
   my:img name=/
  
  
  
   And let say that each my:img is supposed to download the image and
   save it locally or something like that, and I don't want tomcat to
   wait till the first tag is finished.
  
  
  
  
  
   Thanks
  
  
  
  
  
   Yair Ben-Meir
  
  
  
   Office: 073-7997801
  
   Fax: 073-7997800
  
   Mob:   054-5769681
  
  
  
  
  
  
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED

RE: multithreaded with taglibs

2007-11-26 Thread Yair Ben-Meir
Well, the output of the jsp isn't html in my case, but something similar, an
xml file with references to other files.

-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 26, 2007 1:48 PM
To: Tomcat Users List
Subject: Re: multithreaded with taglibs

ben's method does actually produce a static file I think, he's just
producing them on demand and delivering them via a servlet.

I'm curious, why does it have to be a static file, and why does it have
to be a local 'file:' based url?

p



Yair Ben-Meir wrote:
 Hi ben
 Thanks for your idea. In my case, I can't use it, since the generated img
 tag must be a static file (a file: url) and not a link to a servlet.
That's
 why the processing must be when generating the html.
 Thanks
 Yair
 
 
 -Original Message-
 From: ben short [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 26, 2007 1:19 PM
 To: Tomcat Users List
 Subject: Re: multithreaded with taglibs
 
 Yair,
 
 I created a eshop website that dynamically re sizes images depending
 on the url. Here is a simple outline of what happens.
 
 A new product is created by the shop admin. Images are then uploaded
 and stored in a database in the uploaded size.
 
 When a product page is viewed the controller ( im using spring ) pulls
 the product object from the db and passes it to the view, a jsp page.
 
 The jsp then generates a image tag as show below.
 
 img width=175px name=mainImage
 src=productimages/69_s_medium.jpg title=Kitchen Stove and
 Utensils/
 
 The browser then renders the page, when it finds a image tag it then
 uses another thread to load the image. this is standard browser
 behavior.
 
 The productimages url is mapped to another controller, that parses the
 url. The first part of the url is the image id, the next part is tells
 it that the part after that is a size rather than a dimension. The
 controller knows the expected dimensions for a medium image.
 
 The controller then pulls the image from the db and resizes it before
 sending it to the browser. The controller is actually smarter than
 that, and does on disk caching of resized images and check the last
 mod time, but i wont detail that here.
 
 So what is happening here is the browser is rendering the html created
 by the jsp page and then making another request to get the images,
 which is then making tomcat use another thread to generate the image.
 Sound like what your trying to achieve?
 
 Ben
 
 On Nov 26, 2007 10:15 AM, David Cassidy [EMAIL PROTECTED] wrote:
 Errr

 how will you allow people to access the file over the internet with a
 file:// protocol ?

 are you only running the app and the users browser on the same machine ?

 file://C:\My Documents\image.gif

 ?

 Can't see that working over the internet



 On Sun, 2007-11-25 at 13:56 +0200, Yair Ben-Meir wrote:
 Thanks, but that's not good for me, I need the page to be with a real
 file
 link (file://), not through a servlet.


 -Original Message-
 From: Pid [mailto:[EMAIL PROTECTED]
 Sent: Sunday, November 25, 2007 11:53 AM
 To: Tomcat Users List
 Subject: Re: multithreaded with taglibs

 Yair Ben-Meir wrote:
 Let say that the tag will have to generate the image with a text given
 as
 an
 attribute, and it takes time so I want the page to continue:

 my:img src=file text=first/

 .

 my:img src=file text=first/
 Why are you doing this with a tag, rather than sending the parameter to
 a servlet that serves an image into it's output stream?

 You exploit the browsers own request handling capabilities this way.

 img src=/img-app/generate?param1=some+text+here alt=an image /


 p



 -Original Message-
 From: David Cassidy [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 22, 2007 6:08 PM
 To: Tomcat Users List
 Subject: Re: multithreaded with taglibs

 Hi

 What is your tag going to produce ?
 is it an IMG SRC=. type tag ?

 or how are you allowing the browser to access the image ?

 Ta

 D

 On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
 Hi

 Is there a way to write a taglib that will do a multithreading work?
 Meaning, that tomcatwill not wait till the first instance of the tag
 will end, and continue to the rest of the page, and maybe start with
 another instance, and than it will insert the result of each instance
 in the right place?



 Example:

 my:img name=/

 .

 my:img name=/



 And let say that each my:img is supposed to download the image and
 save it locally or something like that, and I don't want tomcat to
 wait till the first tag is finished.





 Thanks





 Yair Ben-Meir



 Office: 073-7997801

 Fax: 073-7997800

 Mob:   054-5769681







 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 -
 To start a new topic, e-mail: users

Re: multithreaded with taglibs

2007-11-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yair,

Yair Ben-Meir wrote:
 You're right about that - it is not for using over the web. Anyway, that's
 just an example. The main issue is to run the work of the tag in a thread
 without making the rest of the page wait.

I think you're hit the nail on the head right there: do the work in a
thread.

FWIW, I think this is an awful idea: if your page renders quickly, the
browser will attempt to load the images before your image threads have a
chance to actually generate the images. The only thing that /might/ work
is to do something like this:

imageHack:parallel
imageHack:image text=foo /
imageHack:image text=bar /
/imageHack:parallel

The parallel tag just sets up an environment for the sub tags. Each
sub tag registers a job with the parent. The end method for the
parallel tag starts one or more threads to actually create the images,
then calls join() on each one. This will allow the images to be
generated in parallel instead of serial order.

You can't close the output stream of the web page until all of the
images are created, otherwise you risk broken images showing up on the
page. If you don't wrap your image tags in some kind of wrapper
(parallel in my example), then you can't gather the threads in a sane
way in order to join() on them all.

Again, this sounds awful. Why not use http URLs instead of file urls?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHSxP89CaO5/Lv0PARAmDwAJ9zyDEq/U1LCIRnkLs69v+yMsxJrACgrULl
bH2y/sAsOyQ+IZUbw3aRIzM=
=wAKM
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: multithreaded with taglibs

2007-11-26 Thread Yair Ben-Meir
Thanks chris,
The generated output of the JSP is not html and not for an explorer...
that's why it has to be generated along the JSP work.

Btw - i thought of something: maybe the img tag will run a thread, return an
outout to the page with some new image name, and release the jsp to
continue. The thread will do the work and save the new image under the name
the tag returned to the page. At the end of the page, a wait tag will be
for waiting to whole of the threads to finish. That's the best thing I
thought of till now.
Thanks
Yair


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 26, 2007 8:44 PM
To: Tomcat Users List
Subject: Re: multithreaded with taglibs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yair,

Yair Ben-Meir wrote:
 You're right about that - it is not for using over the web. Anyway, that's
 just an example. The main issue is to run the work of the tag in a thread
 without making the rest of the page wait.

I think you're hit the nail on the head right there: do the work in a
thread.

FWIW, I think this is an awful idea: if your page renders quickly, the
browser will attempt to load the images before your image threads have a
chance to actually generate the images. The only thing that /might/ work
is to do something like this:

imageHack:parallel
imageHack:image text=foo /
imageHack:image text=bar /
/imageHack:parallel

The parallel tag just sets up an environment for the sub tags. Each
sub tag registers a job with the parent. The end method for the
parallel tag starts one or more threads to actually create the images,
then calls join() on each one. This will allow the images to be
generated in parallel instead of serial order.

You can't close the output stream of the web page until all of the
images are created, otherwise you risk broken images showing up on the
page. If you don't wrap your image tags in some kind of wrapper
(parallel in my example), then you can't gather the threads in a sane
way in order to join() on them all.

Again, this sounds awful. Why not use http URLs instead of file urls?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHSxP89CaO5/Lv0PARAmDwAJ9zyDEq/U1LCIRnkLs69v+yMsxJrACgrULl
bH2y/sAsOyQ+IZUbw3aRIzM=
=wAKM
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multithreaded with taglibs

2007-11-25 Thread Pid
Yair Ben-Meir wrote:
 Let say that the tag will have to generate the image with a text given as an
 attribute, and it takes time so I want the page to continue:
 
 my:img src=file text=first/
 
 .
 
 my:img src=file text=first/

Why are you doing this with a tag, rather than sending the parameter to
a servlet that serves an image into it's output stream?

You exploit the browsers own request handling capabilities this way.

img src=/img-app/generate?param1=some+text+here alt=an image /


p



 -Original Message-
 From: David Cassidy [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, November 22, 2007 6:08 PM
 To: Tomcat Users List
 Subject: Re: multithreaded with taglibs
 
 Hi
 
 What is your tag going to produce ?
 is it an IMG SRC=. type tag ?
 
 or how are you allowing the browser to access the image ?
 
 Ta
 
 D
 
 On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
 Hi

 Is there a way to write a taglib that will do a multithreading work?
 Meaning, that tomcatwill not wait till the first instance of the tag
 will end, and continue to the rest of the page, and maybe start with
 another instance, and than it will insert the result of each instance
 in the right place?

  

 Example:

 my:img name=/

 .

 my:img name=/

  

 And let say that each my:img is supposed to download the image and
 save it locally or something like that, and I don't want tomcat to
 wait till the first tag is finished.

  

  

 Thanks

  

  

 Yair Ben-Meir

  

 Office: 073-7997801

 Fax: 073-7997800

 Mob:   054-5769681



  


 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: multithreaded with taglibs

2007-11-25 Thread Yair Ben-Meir
Thanks, but that's not good for me, I need the page to be with a real file
link (file://), not through a servlet.


-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 25, 2007 11:53 AM
To: Tomcat Users List
Subject: Re: multithreaded with taglibs

Yair Ben-Meir wrote:
 Let say that the tag will have to generate the image with a text given as
an
 attribute, and it takes time so I want the page to continue:
 
 my:img src=file text=first/
 
 .
 
 my:img src=file text=first/

Why are you doing this with a tag, rather than sending the parameter to
a servlet that serves an image into it's output stream?

You exploit the browsers own request handling capabilities this way.

img src=/img-app/generate?param1=some+text+here alt=an image /


p



 -Original Message-
 From: David Cassidy [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, November 22, 2007 6:08 PM
 To: Tomcat Users List
 Subject: Re: multithreaded with taglibs
 
 Hi
 
 What is your tag going to produce ?
 is it an IMG SRC=. type tag ?
 
 or how are you allowing the browser to access the image ?
 
 Ta
 
 D
 
 On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
 Hi

 Is there a way to write a taglib that will do a multithreading work?
 Meaning, that tomcatwill not wait till the first instance of the tag
 will end, and continue to the rest of the page, and maybe start with
 another instance, and than it will insert the result of each instance
 in the right place?

  

 Example:

 my:img name=/

 .

 my:img name=/

  

 And let say that each my:img is supposed to download the image and
 save it locally or something like that, and I don't want tomcat to
 wait till the first tag is finished.

  

  

 Thanks

  

  

 Yair Ben-Meir

  

 Office: 073-7997801

 Fax: 073-7997800

 Mob:   054-5769681



  


 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: multithreaded with taglibs

2007-11-24 Thread Yair Ben-Meir
Let say that the tag will have to generate the image with a text given as an
attribute, and it takes time so I want the page to continue:

my:img src=file text=first/

.

my:img src=file text=first/


-Original Message-
From: David Cassidy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 22, 2007 6:08 PM
To: Tomcat Users List
Subject: Re: multithreaded with taglibs

Hi

What is your tag going to produce ?
is it an IMG SRC=. type tag ?

or how are you allowing the browser to access the image ?

Ta

D

On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
 Hi
 
 Is there a way to write a taglib that will do a multithreading work?
 Meaning, that tomcatwill not wait till the first instance of the tag
 will end, and continue to the rest of the page, and maybe start with
 another instance, and than it will insert the result of each instance
 in the right place?
 
  
 
 Example:
 
 my:img name=/
 
 .
 
 my:img name=/
 
  
 
 And let say that each my:img is supposed to download the image and
 save it locally or something like that, and I don't want tomcat to
 wait till the first tag is finished.
 
  
 
  
 
 Thanks
 
  
 
  
 
 Yair Ben-Meir
 
  
 
 Office: 073-7997801
 
 Fax: 073-7997800
 
 Mob:   054-5769681
 
 
 
  
 
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



multithreaded with taglibs

2007-11-22 Thread Yair Ben-Meir
Hi

Is there a way to write a taglib that will do a multithreading work?
Meaning, that tomcat will not wait till the first instance of the tag will
end, and continue to the rest of the page, and maybe start with another
instance, and than it will insert the result of each instance in the right
place?

 

Example:

my:img name=/

.

my:img name=/

 

And let say that each my:img is supposed to download the image and save it
locally or something like that, and I don't want tomcat to wait till the
first tag is finished.

 

 

Thanks

 

 

Yair Ben-Meir

 

Office: 073-7997801

Fax: 073-7997800

Mob:   054-5769681



 

image001.jpg

Re: multithreaded with taglibs

2007-11-22 Thread David Cassidy
Hi

What is your tag going to produce ?
is it an IMG SRC=. type tag ?

or how are you allowing the browser to access the image ?

Ta

D

On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
 Hi
 
 Is there a way to write a taglib that will do a multithreading work?
 Meaning, that tomcatwill not wait till the first instance of the tag
 will end, and continue to the rest of the page, and maybe start with
 another instance, and than it will insert the result of each instance
 in the right place?
 
  
 
 Example:
 
 my:img name=””/
 
 …
 
 my:img name=””/
 
  
 
 And let say that each my:img is supposed to download the image and
 save it locally or something like that, and I don’t want tomcat to
 wait till the first tag is finished.
 
  
 
  
 
 Thanks
 
  
 
  
 
 Yair Ben-Meir
 
  
 
 Office: 073-7997801
 
 Fax: 073-7997800
 
 Mob:   054-5769681
 
 
 
  
 
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread Le Nguyen-Thinh

Dear friends,

I have a JSP which uses following taglibs:

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %


My JSP contains a piece of code which calls a tag from the taglib above:
c:forEach begin=${0} end=${MAX-1} step=${1} var=ind   
  
c:set target=${argBean} property=name 
value=${paramValues.argName[ind]} /
c:set target=${argBean} property=type 
value=${paramValues.argType[ind]} /
c:set target=${argBean} property=mode 
value=${paramValues.argMode[ind]} /
c:set target=${argBean} property=state 
value=${paramValues.argState[ind]} /
c:set target=${predBean} property=predArg 
value=${argBean} /
/c:forEach  

The Tomcat server returns following error:

java.lang.NumberFormatException: For input string: ${0}

java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:447)
java.lang.Integer.valueOf(Integer.java:553)
org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:752)

It seems to me that Tomcat could not interpret the JSP. 
My question is, do I miss some libraries? Do 
My application runs on Linux Debian, Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05) (j2sdk1.5-sun).

The taglibs jstl.jar and standard.jar stem from jakarta-taglibs-standard-1.1.2.

Thanks a lot for your help.

Thinh


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread Pid
which version of tomcat are you using?

is Expression Language enabled? as it looks like it's passing the ${0}
variable as a string rather than evaluating it.

Try setting the following attribute in your JSP 'page' directive.

%@ page ... isELIgnored=false %


Le Nguyen-Thinh wrote:
 Dear friends,
 
 I have a JSP which uses following taglibs:
 
 %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
 %@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %
 
 
 My JSP contains a piece of code which calls a tag from the taglib above:
 c:forEach begin=${0} end=${MAX-1} step=${1}
 var=ind   
 c:set target=${argBean} property=name
 value=${paramValues.argName[ind]} /
 c:set target=${argBean} property=type
 value=${paramValues.argType[ind]} /
 c:set target=${argBean} property=mode
 value=${paramValues.argMode[ind]} /
 c:set target=${argBean} property=state
 value=${paramValues.argState[ind]} /
 c:set target=${predBean} property=predArg
 value=${argBean} /
 /c:forEach   
 
 The Tomcat server returns following error:
 
 java.lang.NumberFormatException: For input string: ${0}
 
 java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
 
 java.lang.Integer.parseInt(Integer.java:447)
 java.lang.Integer.valueOf(Integer.java:553)
 org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:752)
 
 It seems to me that Tomcat could not interpret the JSP. My question is,
 do I miss some libraries? Do My application runs on Linux Debian,
 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
 (j2sdk1.5-sun).
 The taglibs jstl.jar and standard.jar stem from
 jakarta-taglibs-standard-1.1.2.
 
 Thanks a lot for your help.
 
 Thinh
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread David Smith
One other possibility -- which servlet spec version do you have 
specified in your web.xml?  If web.xml declares an older version of the 
servlet spec, these ${} expressions may not be available.


--David

Pid wrote:


which version of tomcat are you using?

is Expression Language enabled? as it looks like it's passing the ${0}
variable as a string rather than evaluating it.

Try setting the following attribute in your JSP 'page' directive.

%@ page ... isELIgnored=false %


Le Nguyen-Thinh wrote:
 


Dear friends,

I have a JSP which uses following taglibs:

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %


My JSP contains a piece of code which calls a tag from the taglib above:
c:forEach begin=${0} end=${MAX-1} step=${1}
var=ind   
   c:set target=${argBean} property=name

value=${paramValues.argName[ind]} /
   c:set target=${argBean} property=type
value=${paramValues.argType[ind]} /
   c:set target=${argBean} property=mode
value=${paramValues.argMode[ind]} /
   c:set target=${argBean} property=state
value=${paramValues.argState[ind]} /
   c:set target=${predBean} property=predArg
value=${argBean} /
/c:forEach   


The Tomcat server returns following error:

java.lang.NumberFormatException: For input string: ${0}
   java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

   java.lang.Integer.parseInt(Integer.java:447)
   java.lang.Integer.valueOf(Integer.java:553)
   org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:752)

It seems to me that Tomcat could not interpret the JSP. My question is,
do I miss some libraries? Do My application runs on Linux Debian,
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
(j2sdk1.5-sun).
The taglibs jstl.jar and standard.jar stem from
jakarta-taglibs-standard-1.1.2.

Thanks a lot for your help.

Thinh


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



   



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread Le Nguyen-Thinh

Thanks all for your advice.
My web.xml has an entry:

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;

which, I think, caused the error.

I have inserted the line:

%@ page ... isELIgnored=false %

as Pid suggested and the error disappeared.

Thanks a lot.

Thinh


David Smith wrote:

One other possibility -- which servlet spec version do you have 
specified in your web.xml?  If web.xml declares an older version of 
the servlet spec, these ${} expressions may not be available.


--David

Pid wrote:


which version of tomcat are you using?

is Expression Language enabled? as it looks like it's passing the ${0}
variable as a string rather than evaluating it.

Try setting the following attribute in your JSP 'page' directive.

%@ page ... isELIgnored=false %


Le Nguyen-Thinh wrote:
 


Dear friends,

I have a JSP which uses following taglibs:

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %


My JSP contains a piece of code which calls a tag from the taglib 
above:

c:forEach begin=${0} end=${MAX-1} step=${1}
var=ind  c:set 
target=${argBean} property=name

value=${paramValues.argName[ind]} /
   c:set target=${argBean} property=type
value=${paramValues.argType[ind]} /
   c:set target=${argBean} property=mode
value=${paramValues.argMode[ind]} /
   c:set target=${argBean} property=state
value=${paramValues.argState[ind]} /
   c:set target=${predBean} property=predArg
value=${argBean} /
/c:forEach  
The Tomcat server returns following error:


java.lang.NumberFormatException: For input string: ${0}
   
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) 



   java.lang.Integer.parseInt(Integer.java:447)
   java.lang.Integer.valueOf(Integer.java:553)
   org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:752)

It seems to me that Tomcat could not interpret the JSP. My question is,
do I miss some libraries? Do My application runs on Linux Debian,
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
(j2sdk1.5-sun).
The taglibs jstl.jar and standard.jar stem from
jakarta-taglibs-standard-1.1.2.

Thanks a lot for your help.

Thinh


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread Hassan Schroeder

On 8/8/06, Le Nguyen-Thinh [EMAIL PROTECTED] wrote:


My JSP contains a piece of code which calls a tag from the taglib above:
c:forEach begin=${0} end=${MAX-1} step=${1} var=ind


What in the world is that supposed  to be referring to?


java.lang.NumberFormatException: For input string: ${0}


Try:  c:forEach begin=0 end=${MAX-1} step=1 var=ind

(assuming MAX is actually set somewhere to an integer value...)

--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FAQ? Taglibs not rendering in Tomcat 5

2006-02-10 Thread catfarm

(IF this is a FAQ please redirect me)

I built an app with extensive use of tag libraries. It runs great on my build 
machine with TC4 but doesn't render properly on the test box running TC5. The 
get/set methods for the taglib are being called but not writeTagBodyContent. 
This is never being called.

Surely this is a known problem. Am I running a stale version?

Thanks.

RE: FAQ? Taglibs not rendering in Tomcat 5

2006-02-10 Thread Tim Lucia
Chuck would ask you to tell us what version of Tomcat 5 (5.0, 5.5) and the
release number (.28, .12), and he would ask for the O/S, and probably ask if
there were any exceptions in the log...

Remember, the more information you give us, the easier it is for us to help
you and the likelier you are to experience quick turnaround.

Tim 

-Original Message-
From: catfarm [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 10, 2006 2:23 PM
To: users@tomcat.apache.org
Subject: FAQ? Taglibs not rendering in Tomcat 5


(IF this is a FAQ please redirect me)

I built an app with extensive use of tag libraries. It runs great on my
build machine with TC4 but doesn't render properly on the test box running
TC5. The get/set methods for the taglib are being called but not
writeTagBodyContent. This is never being called.

Surely this is a known problem. Am I running a stale version?

Thanks.


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