tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Kennedy" <just...@maritimesource.ca>
Subject porting to tomcat 5
Date Tue, 14 Sep 2004 04:31:18 GMT
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

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message