You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Justin Kennedy <ju...@maritimesource.ca> on 2004/09/14 06:31:18 UTC

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

 


Re: porting to tomcat 5

Posted by QM <qm...@brandxdev.net>.
On Tue, Sep 14, 2004 at 02:38:02PM -0300, Justin Kennedy wrote:
: 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?

Perhaps you left out some necessary information, such as what version of
Tomcat 5 you're running.

You say you're porting to Tomcat 5: did you rebuild the app against the
newer Tomcat 5 JARs?

Finally, while I understand your original tags were written before
servlet spec 2.4/JSP spec 2.0, have you at least tried using JSTL?  You
could setup a stripped-down JSP that contains just the section in
question, then try that with both your tags and JSTL.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: porting to tomcat 5

Posted by Justin Kennedy <ju...@maritimesource.ca>.
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:justink@maritimesource.ca] 
Sent: Tuesday, September 14, 2004 1:31 AM
To: tomcat-user@jakarta.apache.org
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org