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 <trans:storeValue tag, for pure jstl i would have in my code something like this <c:choose> <c:when test="${param.mode == 'SearchContacts'}"> <c:set var="tmpEmail" value="accountSearchPersonal" /> </c:when> <c:otherwise> </c:otherwise> <c:set var="tmpEmail" value="accountSelectPersonal" /> </c:choose> 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"))){ %> > > > > <trans:storeValue id='tmpEmail' column='cont_email' > >transactId="accountSearchPersonal"/> > > > > <% } else > if(request.getParameter("mode").equals("SelectPersonal")){ > >%> > > > > <trans:storeValue id='tmpEmail' column='cont_email' > >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 > >_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] > > > This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]