You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by probertm <pr...@gmail.com> on 2007/05/24 21:17:36 UTC

Struts 1.x and Tomcat 5 problem


Hi ..

I am starting to play with Struts (rev 1.2, I think) and have a little
"problem".  I am having to use an older version of Struts against a recent
Tomcat (rev 5.5) and I am getting an

  /search.jsp(62,0) The end tag "&lt;/logic:present" is unbalanced

error, and all of the logic: statements -are- balanced.  From a little
research, it seems that this may be a taglib issue, though I can find
nothing to confirm that (currently I am including struts-bean.tld,
struts-html.tld and struts-logic.tld).

Any thoughts?

Thanks,
-mark.


-- 
View this message in context: http://www.nabble.com/Struts-1.x-and-Tomcat-5-problem-tf3812184.html#a10790767
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: Struts 1.x and Tomcat 5 problem

Posted by Christopher Loschen <CL...@axeda.com>.
The / at the end of the <logic:present> tag closes that tag, so the
other </logic:present> closes it for a second time, making it
unbalanced.

Assuming you have some sort of content between the two tags, it should
be

<logic:present name="searchForm" property="results">
Content...
</logic:present>

HTH, Chris

-----Original Message-----
From: probertm [mailto:probertm@gmail.com] 
Sent: Thursday, May 24, 2007 5:31 PM
To: user@struts.apache.org
Subject: Re: Struts 1.x and Tomcat 5 problem




Dave Newton-4 wrote:
> 
> --- probertm <pr...@gmail.com> wrote:
>> <logic:present name="searchForm" property="results"/>
>> </logic:present>
> 
> Looks unbalanced to me...
> 
> 

Sorry for being thick, Dave.  I don't get it.  
Could you spell it out?

-- 
View this message in context:
http://www.nabble.com/Struts-1.x-and-Tomcat-5-problem-tf3812184.html#a10
793090
Sent from the Struts - User mailing list archive at Nabble.com.


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


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


RE: Struts 1.x and Tomcat 5 problem

Posted by Dave Newton <ne...@yahoo.com>.
--- probertm <pr...@gmail.com> wrote:
> Doh!  My apologies for the wasted bandwidth ..

Nah. We all do silly stuff, probably a lot :)

d.



       
____________________________________________________________________________________Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

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


RE: Struts 1.x and Tomcat 5 problem

Posted by probertm <pr...@gmail.com>.


animesh.saxena wrote:
> 
> Two times you are closing the tag, I guess
> 

Doh!  My apologies for the wasted bandwidth ..
Trailing "/"-itis!

Thank you, Dave.
Thank you, Animesh.
-- 
View this message in context: http://www.nabble.com/Struts-1.x-and-Tomcat-5-problem-tf3812184.html#a10793391
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: Struts 1.x and Tomcat 5 problem

Posted by Sourabh Chandan <so...@interglobetechnologies.com>.
Hi ,

What i got in your code is that you are closing <logic:present name=""
property=""  / >
Remove / from first line.
You line should be
<logic:present name="searchForm" property="results">

Whatever your condition is applied.

</logic:present> (Closed Here Also).

Sourabh



-----Original Message-----
From: animesh.saxena@wipro.com [mailto:animesh.saxena@wipro.com]
Sent: Friday, May 25, 2007 3:08 AM
To: user@struts.apache.org
Subject: RE: Struts 1.x and Tomcat 5 problem



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not
the intended recipient, you should not disseminate, distribute or copy this
e-mail. Please notify the sender immediately and destroy all copies of this
message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

www.wipro.com


+++++++++++++++++++++++++++++++++++++++++
CONFIDENTIALITY NOTICE & DISCLAIMER

The contents of this e-mail are confidential to the ordinary user of the e-mail address to which it was addressed and may also be privileged.  If you are not the addressee of this e-mail you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever.  If you have received this e-mail in error please e-mail the sender by replying to this message. The recipient should check this email and any attachments for the presence of viruses. InterGlobe accepts no liability for any damage caused by any virus transmitted by this email.
+++++++++++++++++++++++++++++++++++++++++

RE: Struts 1.x and Tomcat 5 problem

Posted by an...@wipro.com.
Two times you are closing the tag, I guess

<logic:present name="searchForm" property="results"/> (Closed Here)
</logic:present> (Closed Here Also). 

Should be

<logic:present name="searchForm" property="results"/>

Ani


-----Original Message-----
From: probertm [mailto:probertm@gmail.com]
Sent: Fri 5/25/2007 3:01 AM
To: user@struts.apache.org
Subject: Re: Struts 1.x and Tomcat 5 problem
 



Dave Newton-4 wrote:
> 
> --- probertm <pr...@gmail.com> wrote:
>> <logic:present name="searchForm" property="results"/>
>> </logic:present>
> 
> Looks unbalanced to me...
> 
> 

Sorry for being thick, Dave.  I don't get it.  
Could you spell it out?

-- 
View this message in context: http://www.nabble.com/Struts-1.x-and-Tomcat-5-problem-tf3812184.html#a10793090
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts 1.x and Tomcat 5 problem

Posted by probertm <pr...@gmail.com>.


Dave Newton-4 wrote:
> 
> --- probertm <pr...@gmail.com> wrote:
>> <logic:present name="searchForm" property="results"/>
>> </logic:present>
> 
> Looks unbalanced to me...
> 
> 

Sorry for being thick, Dave.  I don't get it.  
Could you spell it out?

-- 
View this message in context: http://www.nabble.com/Struts-1.x-and-Tomcat-5-problem-tf3812184.html#a10793090
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Struts 1.x and Tomcat 5 problem

Posted by Dave Newton <ne...@yahoo.com>.
--- probertm <pr...@gmail.com> wrote:
> <logic:present name="searchForm"
property="results"/>
> </logic:present>

Looks unbalanced to me...

d.



       
____________________________________________________________________________________Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

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


Re: Struts 1.x and Tomcat 5 problem

Posted by probertm <pr...@gmail.com>.
Hi, Dave ..
>
> Can you post the JSP in question, or is it too large?
>
See below ..

>
> Then what makes you think it's a taglib issue?
>
There seem to be a number of similar issues posted on the web about that
have a common characteristic of "unbalanced" and "working under Tomcat 4 and
not Tomcat 5".  Though I could find nothing conclusive.

Here is the .jsp.  It is essentially the early sample from the "Struts:
Complete Reference" book by James Holmes.

--< cut >---

<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  <title>
    ABC Inc. Human Resources Portal -- Employee Search
  </title>
</head>
<body>

 ABC Inc. Human Resources Portal <br>
<hr width="80%" noshade="true">
<html:errors/>
<html:form action="/search">
  <table  cellspacing="2" cellpadding="1" border="1" width="80%">
    <tr>
        <td align="right"><bean:message key="label.search.name"/>:</td>
        <td><html:text property="name"/></td>
    </tr>
    <tr>
        <td></td>
        <td>-- or --</td>
    </tr>
    <tr>
        <td align="right"><bean:message key="label.search.empID"/>:</td>
        <td><html:text property="empID"/> (xxx) </td>
    </tr>
    <tr>
        <td></td>
        <td><html:submit/></td>
    </tr>
  </table>
</html:form>

<logic:present name="searchForm" property="results"/>
  <hr width="80%" size=1 noshade="true">
  
  <bean:size id="size" name="searchForm" property="results"/>
  <logic:equal name="size" value="0">
    <center>
      No Employees Found
    </center>
  </logic:equal>
  
  <logic:greaterThan name="size" value="0">
    <table  cellspacing="2" cellpadding="1" border="1" width="80%">
      <tr>
          <th>Name</th>
          <th>Employee ID</th>
      </tr>
      <logic:iterate id="result" name="searchForm" property="results">
        <tr>
            <td><bean:write name="result" property="name"/></td>
            <td><bean:write name="result" property="empID"/></td>
        </tr>
      </logic:iterate>
    </table>
  </logic:greaterThan>
</logic:present>

</body>
</html>
---< cut >---

-mark.

-- 
View this message in context: http://www.nabble.com/Struts-1.x-and-Tomcat-5-problem-tf3812184.html#a10792360
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Struts 1.x and Tomcat 5 problem

Posted by Dave Newton <ne...@yahoo.com>.
--- probertm <pr...@gmail.com> wrote:
> [...] and all of the logic: statements -are-
balanced.  

Can you post the JSP in question, or is it too large?

> From a little research, it seems that this may be a 
> taglib issue, though I can find nothing to confirm 
> that 

Then what makes you think it's a taglib issue?

I guess I'm not sure I see how you'd be getting that
error w/o an unbalanced <logic:present.../> tag... I'd
look for unbalanced quotes, too (aside from the
obvious double-checking of tags and their nestings).

d.



 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 

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