RE: porting to tomcat 5

2004-09-14 Thread Justin Kennedy
Please note, these jsps and tag library were written on the servlet/jsp
2.2/1.1 spec, so I don't think this stuff was available at that time (I
maybe be wrong though).

Anyway, about the storevalue tag: it takes the value of the column in
the sql resultset identified by "transactId" and writes it to the output
stream. But this doesn't really matter, because if you look at the JSP
then see what tomcat generates, there's obviously an error in the way
Tomcat is handling this case. 

In fact I changed the storeValue tag to our storeRowCount, which creates
a variable like storeValue except it stores the row count for the
results from a particular sql transaction. However I still had the same
result... Tomcat doesn't define the variable in the second if block.

Thanks for the help.

-Original Message-
From: Big Chiz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 14, 2004 9:17 PM
To: Tomcat Users List
Subject: Re: porting to tomcat 5

although i didnt understand what the 

   



   


On Tue, 14 Sep 2004 13:41:13 -0400, Shapira, Yoav <[EMAIL PROTECTED]>
wrote:
> 
> Hi,
> No, your question is fine.  Perhaps no one knows or all the people who
> know the answer don't have time today.  That happens occasionally...
> 
> Yoav Shapira
> Millennium Research Informatics
> 
> 
> 
> 
> >-Original Message-
> >From: Justin Kennedy [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, September 14, 2004 1:38 PM
> >To: 'Tomcat Users List'
> >Subject: RE: porting to tomcat 5
> >
> >Hi,
> >
> >I'm new to this mailing list, so I'm thinking I didn't ask this
> question
> >properly or did something wrong because I never had a response. Maybe
I
> >posted too much code?
> >
> >Thanks,
> >-Justin
> >
> >-Original Message-
> >From: Justin Kennedy [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, September 14, 2004 1:31 AM
> >To: [EMAIL PROTECTED]
> >Subject: porting to tomcat 5
> >
> >Hi,
> >
> >
> >
> >The following JSP/Tag snippet used to work on the 2.2 spec for Resin
> and
> >I believe Tomcat as well. Note: the storeValue tag creates a new
string
> >variable for the id attribute from the sql result set specified in
> >transactId and column:
> >
> >
> >
> ><% if ((request.getParameter("mode").equals("SearchContacts"))){
%>
> >
> > >transactId="accountSearchPersonal"/>
> >
> ><% } else
> if(request.getParameter("mode").equals("SelectPersonal")){
> >%>
> >
> > >transactId="accountSelectPersonal"/>
> >
> ><% } %>
> >
> >
> >
> >The error points to the second storevalue tag and claims the
"tmpEmail"
> >is an "unresolved symbol". I looked at the code generated by Tomcat
and
> >I see the following. Notice the tmpEmail variable isn't defined in
the
> >second block:
> >
> >
> >
> >Here's the code produced in the Tomcat version:
> >
> > if ((request.getParameter("mode").equals("SearchContacts"))){
> >
> >  //  trans:storeValue
> >
> >  java.lang.String tmpEmail = null;
> >
> >  quicksetit.tags.transaction.StoreValueTag
> >_jspx_th_trans_storeValue_0 = new
> >quicksetit.tags.transaction.StoreValueTag();
> >
> >
> >_jspx_th_trans_storeValue_0.setPageContext(_jspx_page_context);
> >
> >
> >_jspx_th_trans_storeValue_0.setParent((javax.servlet.jsp.tagext.Tag)
> >_jspx_th_logic_exists_0);
> >
> >  _jspx_th_trans_storeValue_0.setId("tmpEmail");
> >
> >  _jspx_th_trans_storeValue_0.setColumn("cont_email");
> >
> >
> >_jspx_th_trans_storeValue_0.setTransactId("accountSearchPersonal");
> >
> >  int _jspx_eval_trans_storeValue_0 =
> >_jspx_th_trans_storeValue_0.doStartTag();
> >
> >  tmpEmail = (java.lang.String)
> >_jspx_page_context.findAttribute("tmpEmail");
> >
> >  if (_jspx_th_trans_storeValue_0.doEndTag() ==
> >javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
> >
> >return;
> >
> >  tmpEmail = (java.lang.String)
> >_jspx_page_context.findAttribute("tmpEmail");
> >
> >} else if(request.getParameter("mode").equals("SelectPersonal")){
> >
> >  //  trans:storeValue
> >
> >  quicksetit.tags.transaction.StoreValueTag
&

RE: porting to tomcat 5

2004-09-14 Thread Justin Kennedy
Hi,

I'm new to this mailing list, so I'm thinking I didn't ask this question
properly or did something wrong because I never had a response. Maybe I
posted too much code?

Thanks,
-Justin

-Original Message-----
From: Justin Kennedy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 14, 2004 1:31 AM
To: [EMAIL PROTECTED]
Subject: porting to tomcat 5

Hi,

 

The following JSP/Tag snippet used to work on the 2.2 spec for Resin and
I believe Tomcat as well. Note: the storeValue tag creates a new string
variable for the id attribute from the sql result set specified in
transactId and column:

 

<% if ((request.getParameter("mode").equals("SearchContacts"))){ %>



<% } else if(request.getParameter("mode").equals("SelectPersonal")){
%>



<% } %>

 

The error points to the second storevalue tag and claims the "tmpEmail"
is an "unresolved symbol". I looked at the code generated by Tomcat and
I see the following. Notice the tmpEmail variable isn't defined in the
second block:

 

Here's the code produced in the Tomcat version:

 if ((request.getParameter("mode").equals("SearchContacts"))){

  //  trans:storeValue

  java.lang.String tmpEmail = null;

  quicksetit.tags.transaction.StoreValueTag
_jspx_th_trans_storeValue_0 = new
quicksetit.tags.transaction.StoreValueTag();

 
_jspx_th_trans_storeValue_0.setPageContext(_jspx_page_context);

 
_jspx_th_trans_storeValue_0.setParent((javax.servlet.jsp.tagext.Tag)
_jspx_th_logic_exists_0);

  _jspx_th_trans_storeValue_0.setId("tmpEmail");

  _jspx_th_trans_storeValue_0.setColumn("cont_email");

 
_jspx_th_trans_storeValue_0.setTransactId("accountSearchPersonal");

  int _jspx_eval_trans_storeValue_0 =
_jspx_th_trans_storeValue_0.doStartTag();

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

  if (_jspx_th_trans_storeValue_0.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)

return;

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

} else if(request.getParameter("mode").equals("SelectPersonal")){

  //  trans:storeValue

  quicksetit.tags.transaction.StoreValueTag
_jspx_th_trans_storeValue_1 = new
quicksetit.tags.transaction.StoreValueTag();

 
_jspx_th_trans_storeValue_1.setPageContext(_jspx_page_context);

 
_jspx_th_trans_storeValue_1.setParent((javax.servlet.jsp.tagext.Tag)
_jspx_th_logic_exists_0);

  _jspx_th_trans_storeValue_1.setId("tmpEmail");

  _jspx_th_trans_storeValue_1.setColumn("cont_email");

 
_jspx_th_trans_storeValue_1.setTransactId("accountSelectPersonal");

  int _jspx_eval_trans_storeValue_1 =
_jspx_th_trans_storeValue_1.doStartTag();

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

  if (_jspx_th_trans_storeValue_1.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)

return;

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

}

 

Thanks for the help!!

 

-Justin

 



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



porting to tomcat 5

2004-09-13 Thread Justin Kennedy
Hi,

 

The following JSP/Tag snippet used to work on the 2.2 spec for Resin and
I believe Tomcat as well. Note: the storeValue tag creates a new string
variable for the id attribute from the sql result set specified in
transactId and column:

 

<% if ((request.getParameter("mode").equals("SearchContacts"))){ %>



<% } else if(request.getParameter("mode").equals("SelectPersonal")){
%>



<% } %>

 

The error points to the second storevalue tag and claims the "tmpEmail"
is an "unresolved symbol". I looked at the code generated by Tomcat and
I see the following. Notice the tmpEmail variable isn't defined in the
second block:

 

Here's the code produced in the Tomcat version:

 if ((request.getParameter("mode").equals("SearchContacts"))){

  //  trans:storeValue

  java.lang.String tmpEmail = null;

  quicksetit.tags.transaction.StoreValueTag
_jspx_th_trans_storeValue_0 = new
quicksetit.tags.transaction.StoreValueTag();

 
_jspx_th_trans_storeValue_0.setPageContext(_jspx_page_context);

 
_jspx_th_trans_storeValue_0.setParent((javax.servlet.jsp.tagext.Tag)
_jspx_th_logic_exists_0);

  _jspx_th_trans_storeValue_0.setId("tmpEmail");

  _jspx_th_trans_storeValue_0.setColumn("cont_email");

 
_jspx_th_trans_storeValue_0.setTransactId("accountSearchPersonal");

  int _jspx_eval_trans_storeValue_0 =
_jspx_th_trans_storeValue_0.doStartTag();

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

  if (_jspx_th_trans_storeValue_0.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)

return;

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

} else if(request.getParameter("mode").equals("SelectPersonal")){

  //  trans:storeValue

  quicksetit.tags.transaction.StoreValueTag
_jspx_th_trans_storeValue_1 = new
quicksetit.tags.transaction.StoreValueTag();

 
_jspx_th_trans_storeValue_1.setPageContext(_jspx_page_context);

 
_jspx_th_trans_storeValue_1.setParent((javax.servlet.jsp.tagext.Tag)
_jspx_th_logic_exists_0);

  _jspx_th_trans_storeValue_1.setId("tmpEmail");

  _jspx_th_trans_storeValue_1.setColumn("cont_email");

 
_jspx_th_trans_storeValue_1.setTransactId("accountSelectPersonal");

  int _jspx_eval_trans_storeValue_1 =
_jspx_th_trans_storeValue_1.doStartTag();

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

  if (_jspx_th_trans_storeValue_1.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)

return;

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

}

 

Thanks for the help!!

 

-Justin

 



RE: tag reuse, setParent and findAncestorWithClass

2004-09-07 Thread Justin Kennedy
Thanks Tim, I got it working!

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 07, 2004 10:07 AM
To: Tomcat Users List
Subject: Re: tag reuse, setParent and findAncestorWithClass

Turn off tag pooling.

-Tim

Justin Kennedy wrote:

> Hi Tim,
> 
> I read through the link you posted but I don't see any references to
> setParent. I understand that setParent is only called once when the
> attributes for a tag are the same (because it's reused), so how should
I
> go about developing the inner tag so the parent will always be set? I
> read up on SimpleTag and that could be the answer, but I'm worried
about
> performance with this because the writevalue tag is called many many
> times on one page.
> 
> Thanksk
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 07, 2004 7:59 AM
> To: Tomcat Users List
> Subject: Re: tag reuse, setParent and findAncestorWithClass
> 
> http://jakarta.apache.org/tomcat/faq/misc.html#tagbroken
> 
> -tim
> 
> Justin Kennedy wrote:
> 
>>Hi,
>>
>> 
>>
>>I'm upgrading our tag library to Tomcat 5 and having problems. Note
> 
> that
> 
>>they were written back in JSP 1.1 and haven't changed for a few years.
>>
>> 
>>
>>The problem looks like the tags are being cached and the setParent
> 
> isn't
> 
>>being called for each new "reuse". As a result the wrong tag is
> 
> returned
> 
>>from findAncestorWithClass when the WriteValueTag is re-used in a
>>different nested block. Maybe this is how the spec was designed and I
>>just don't know the right way to code the tags. Anyway here's what the
>>JSP page looks like (note: transacttag issues a call to the database.
>>Writevaluetag writes the value of a column from the data returned from
>>transacttag. If 'transactId' isn't passed to WriteValueTag, it will
> 
> use
> 
>>the findAncestorWithClass to find the enclosing IterateTag to
> 
> determine
> 
>>the transactId):
>>
>> 
>>
>>
>>
>>
>>
>>  
>>
>>a - 
>>
>>
>>
>> 
> value='<%=
> 
>>tmpuiid %>'/>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>>#1 - 
>>
>>#2 - >column="FORM_NAME"/>
>>
>>#3 - 
>>
>>
>>
>>
>>
>>  
>>
>>
>>
>> 
>>
>> 
>>
>>The problems:
>>
>>1.UI_NAME in #1 is a column from the first "uis" transactTag. The
>>writeValueTag prints out the value of this column but it shouldn't
>>behave this way because it's enclosed IterateTag has a different
>>"transactId". I put this here to demonstrate the problem
>>2.FORM_NAME in #3 is a column in the second transactTag of "ui".
>>This column value SHOULD be output (like it has always done) because
> 
> the
> 
>>enclosed iterateTag specifies the proper transactId, but this value is
>>not output because it's parent is set to the first IterateTag and not
>>the second, hence the different transactIds.
>>
>> 
>>
>>#2 works only because I'm explicitly setting the transactId. 
>>
>> 
>>
>>The WriteValueTag extends the TagSupport class and everything is done
> 
> in
> 
>>the doStartTag event.
>>

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




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



RE: tag reuse, setParent and findAncestorWithClass

2004-09-07 Thread Justin Kennedy
Tim,

I added this to my tomcat_home/conf/web.xml:


jsp
 
org.apache.jasper.servlet.JspServlet

enablePooling
false



I put it right after:


But I still see the same behavior. Note: This setting is not overridden
in the web.xml for my webapp... I tried putting it there too but no
luck.

Thanks

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 07, 2004 10:07 AM
To: Tomcat Users List
Subject: Re: tag reuse, setParent and findAncestorWithClass

Turn off tag pooling.

-Tim

Justin Kennedy wrote:

> Hi Tim,
> 
> I read through the link you posted but I don't see any references to
> setParent. I understand that setParent is only called once when the
> attributes for a tag are the same (because it's reused), so how should
I
> go about developing the inner tag so the parent will always be set? I
> read up on SimpleTag and that could be the answer, but I'm worried
about
> performance with this because the writevalue tag is called many many
> times on one page.
> 
> Thanksk
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 07, 2004 7:59 AM
> To: Tomcat Users List
> Subject: Re: tag reuse, setParent and findAncestorWithClass
> 
> http://jakarta.apache.org/tomcat/faq/misc.html#tagbroken
> 
> -tim
> 
> Justin Kennedy wrote:
> 
>>Hi,
>>
>> 
>>
>>I'm upgrading our tag library to Tomcat 5 and having problems. Note
> 
> that
> 
>>they were written back in JSP 1.1 and haven't changed for a few years.
>>
>> 
>>
>>The problem looks like the tags are being cached and the setParent
> 
> isn't
> 
>>being called for each new "reuse". As a result the wrong tag is
> 
> returned
> 
>>from findAncestorWithClass when the WriteValueTag is re-used in a
>>different nested block. Maybe this is how the spec was designed and I
>>just don't know the right way to code the tags. Anyway here's what the
>>JSP page looks like (note: transacttag issues a call to the database.
>>Writevaluetag writes the value of a column from the data returned from
>>transacttag. If 'transactId' isn't passed to WriteValueTag, it will
> 
> use
> 
>>the findAncestorWithClass to find the enclosing IterateTag to
> 
> determine
> 
>>the transactId):
>>
>> 
>>
>>
>>
>>
>>
>>  
>>
>>a - 
>>
>>
>>
>> 
> value='<%=
> 
>>tmpuiid %>'/>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>>#1 - 
>>
>>#2 - >column="FORM_NAME"/>
>>
>>#3 - 
>>
>>
>>
>>
>>
>>  
>>
>>
>>
>> 
>>
>> 
>>
>>The problems:
>>
>>1.UI_NAME in #1 is a column from the first "uis" transactTag. The
>>writeValueTag prints out the value of this column but it shouldn't
>>behave this way because it's enclosed IterateTag has a different
>>"transactId". I put this here to demonstrate the problem
>>2.FORM_NAME in #3 is a column in the second transactTag of "ui".
>>This column value SHOULD be output (like it has always done) because
> 
> the
> 
>>enclosed iterateTag specifies the proper transactId, but this value is
>>not output because it's parent is set to the first IterateTag and not
>>the second, hence the different transactIds.
>>
>> 
>>
>>#2 works only because I'm explicitly setting the transactId. 
>>
>> 
>>
>>The WriteValueTag extends the TagSupport class and everything is done
> 
> in
> 
>>the doStartTag event.
>>

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




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



RE: tag reuse, setParent and findAncestorWithClass

2004-09-07 Thread Justin Kennedy
Hi Tim,

I read through the link you posted but I don't see any references to
setParent. I understand that setParent is only called once when the
attributes for a tag are the same (because it's reused), so how should I
go about developing the inner tag so the parent will always be set? I
read up on SimpleTag and that could be the answer, but I'm worried about
performance with this because the writevalue tag is called many many
times on one page.

Thanksk

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 07, 2004 7:59 AM
To: Tomcat Users List
Subject: Re: tag reuse, setParent and findAncestorWithClass

http://jakarta.apache.org/tomcat/faq/misc.html#tagbroken

-tim

Justin Kennedy wrote:
> Hi,
> 
>  
> 
> I'm upgrading our tag library to Tomcat 5 and having problems. Note
that
> they were written back in JSP 1.1 and haven't changed for a few years.
> 
>  
> 
> The problem looks like the tags are being cached and the setParent
isn't
> being called for each new "reuse". As a result the wrong tag is
returned
> from findAncestorWithClass when the WriteValueTag is re-used in a
> different nested block. Maybe this is how the spec was designed and I
> just don't know the right way to code the tags. Anyway here's what the
> JSP page looks like (note: transacttag issues a call to the database.
> Writevaluetag writes the value of a column from the data returned from
> transacttag. If 'transactId' isn't passed to WriteValueTag, it will
use
> the findAncestorWithClass to find the enclosing IterateTag to
determine
> the transactId):
> 
>  
> 
> 
> 
> 
> 
>   
> 
> a - 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
> 
> 
> 
> #1 - 
> 
> #2 -  column="FORM_NAME"/>
> 
> #3 - 
> 
> 
> 
> 
> 
>   
> 
> 
> 
>  
> 
>  
> 
> The problems:
> 
> 1.UI_NAME in #1 is a column from the first "uis" transactTag. The
> writeValueTag prints out the value of this column but it shouldn't
> behave this way because it's enclosed IterateTag has a different
> "transactId". I put this here to demonstrate the problem
> 2.FORM_NAME in #3 is a column in the second transactTag of "ui".
> This column value SHOULD be output (like it has always done) because
the
> enclosed iterateTag specifies the proper transactId, but this value is
> not output because it's parent is set to the first IterateTag and not
> the second, hence the different transactIds.
> 
>  
> 
> #2 works only because I'm explicitly setting the transactId. 
> 
>  
> 
> The WriteValueTag extends the TagSupport class and everything is done
in
> the doStartTag event.
> 
>  

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




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



tag reuse, setParent and findAncestorWithClass

2004-09-06 Thread Justin Kennedy
Hi,

 

I'm upgrading our tag library to Tomcat 5 and having problems. Note that
they were written back in JSP 1.1 and haven't changed for a few years.

 

The problem looks like the tags are being cached and the setParent isn't
being called for each new "reuse". As a result the wrong tag is returned
from findAncestorWithClass when the WriteValueTag is re-used in a
different nested block. Maybe this is how the spec was designed and I
just don't know the right way to code the tags. Anyway here's what the
JSP page looks like (note: transacttag issues a call to the database.
Writevaluetag writes the value of a column from the data returned from
transacttag. If 'transactId' isn't passed to WriteValueTag, it will use
the findAncestorWithClass to find the enclosing IterateTag to determine
the transactId):

 





  

a - 







 





#1 - 

#2 - 

#3 - 





  



 

 

The problems:

1.  UI_NAME in #1 is a column from the first "uis" transactTag. The
writeValueTag prints out the value of this column but it shouldn't
behave this way because it's enclosed IterateTag has a different
"transactId". I put this here to demonstrate the problem
2.  FORM_NAME in #3 is a column in the second transactTag of "ui".
This column value SHOULD be output (like it has always done) because the
enclosed iterateTag specifies the proper transactId, but this value is
not output because it's parent is set to the first IterateTag and not
the second, hence the different transactIds.

 

#2 works only because I'm explicitly setting the transactId. 

 

The WriteValueTag extends the TagSupport class and everything is done in
the doStartTag event.

 

Please advise,

-Justin

 



Re: custom CLASSPATH for beans

2001-03-15 Thread Justin Kennedy

what I do is modify the startup.bat to include the extra classpaths I need. 
so in startup.bat I have:
set CLASSPATH=%CLASSPATH%;whatever.you.want


At 06:21 PM 3/15/2001 -0500, you wrote:
>I'm considering migrating a web site from jserv/gnujsp to Tomcat and don't
>really want to touch where the .class files for beans used by the JSPs and
>they
>are NOT in WEB-INF directories as Tomcat would prefer.  How would I
>go about specifying custom CLASSPATH directories for where beans and
>servlets are located in Tomcat?
>
>Thanks
>Steve Prior

Justin Kennedy
Computer Systems Analyst
Consortio, Inc.
www.consortio.com




3.2.1 commercial applications

2001-03-15 Thread Justin Kennedy

Hi.

Is there a list somewhere of Companies that use Tomcat for their commercial 
applications ? On the jakarta web site it says release builds are those 
that are ready for Prime Time. Does this mean I can use tomcat standalone 
or tomcat + apache for my commercial app ? Some kind of reference would be 
great as I'm getting some crap from my manager for using tomcat and custom tags.