JSTL problem

I am using JSTL on Weblogic 6.1 sp4.
The jsp works fine on Tomcat 4.1.127...but throws the following error in Weblogic.
***********************************************
unreported exception java.lang.Throwable; must be caught or declared to be thrown
                _c_forEach0.doCatch(_t); //[ /jsp/deals/listdealsresultsright.jsp; Line: 90]
                           ^
1 error
***********************************************
Here is the jsp code that causes problem:
**********************************************
      <c:forEach var="dealBean" items="${dealresult}" varStatus="status">
      <h1>Yahoo</h1>
         
      </c:forEach>
***********************************************
Again....the same code works fine in Tomcat 4.1.27.I dont change anything for weblogic.....i use same war file.

I have put the correct jar files in the WEB-INF/lib , that is standard.jar and jstl.jar

Please help , since i have been trying to make this work for a long time.

Thanx
rahulkothariAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimYatesCommented:
Hmmmm...odd...

does:

<%
  try
  {
%>
<c:forEach var="dealBean" items="${dealresult}" varStatus="status">
     <h1>Yahoo</h1>
</c:forEach>
<%
  }
  catch( Exception ex )
  {
      ex.printStackTrace( out ) ;
  }
%>

work?
  }
0
rahulkothariAuthor Commented:
will try in 1 hr and let u know.....thanx for the prompt answer
0
rahulkothariAuthor Commented:
Tim.....
First i got this error : un resolved Symbol : out.
Then i changed the ex.printStackTrace( out ) ;  - to - ex.printStackTrace( );
Now i am getting the : exception must be caught error again.....

Cant figure out why its doing that....
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

TimYatesCommented:
Hmmmm....that's odd...

Are you sure it's the same verson of JSTL on both servers?

Is there a later version in which this may be fixed?

Can you post your JSP code?

Tim
0
rahulkothariAuthor Commented:
I am posting two pieces.....one is that i was using before (that workd with Tomcat 4.1.27) and the second one is which i got from ur ideas :
I am using templates.....so the code u will see doesnt have body and html, head etc tags.
********************************************************************************
<%@ taglib uri='struts/bean-el' prefix='bean' %>
<%@ taglib uri='struts/html-el' prefix='html' %>
<%@ taglib uri='struts/logic-el' prefix='logic' %>
<%@ taglib uri='jstl/c' prefix='c' %>
<c:set var="count" scope="page" value="0"/>

<div align="left"> <b><font color="#003366"> </font></b></div>
<!-- ========== CONTENT (start) ========== -->
<span class="redbold">Search Deals</span>
<a href="#" onClick="showHide('tbl2','e');return false;"><img id="e" src="./../images/expand.gif" border="0" alt="" width="15" height="15"></a>
<br>
<br>
<table id="tbl2" style= "display: none; border: 0px;position:relative; width="70%" border="0"  width="730">
 
  <tr>
    <td>
      <html:form action="/searchdeal" >
        <table width="309" class="tabTable">
    <tr>
      <td colspan="2" class="tabtitle">Search Deal By:</td>
    </tr>
    <tr>
      <td width="33%" class="right">Client MNC : </td>
      <td width="67%">
        <html:text styleClass="inputtextmedium" property="ccMNC"/>
      </td>
    </tr>
    <tr>
      <td width="33%" class="right"> Deal MNC: </td>
      <td width="67%">
        <html:text styleClass="inputtextmedium" property="dealMNC"/>
      </td>
    </tr>
    <tr>
      <td width="33%" height="46">&nbsp;</td>
      <td width="67%" height="46">
        <!--  <input type="button" class="submitsmall" name="Submit43" value="Search" onClick="window.location='./listdealsresults.jsp';">
        <input type="button" class="submitsmall" name="Button" value="Cancel" onClick="window.location='./home.jsp'">-->
      <html:submit styleClass="submitsmall" value="Search" property="button"/>
      <html:button styleClass="submitsmall" value="Cancel" property="button" onclick="window.location='./home.jsp'"/>
            
            <!-- ========== CONTENT (end) ========== -->
      </td>
    </tr>
  </table>
 </html:form>
     
    </td>
  </tr>
</table>


<hr width="665" align="left">
<span class="bio_listMedium">Deal Search Result : <font size=2 color="red"><c:out value="${matches}"/></font> matches found</span> <br>
<!-- ========== CONTENT (start) ========== -->
<br>

<logic:messagesPresent>
   <hr>
    <span id="errorsHeader"><bean:message key="errors.search.header"/></span>
    <html:messages id="error">
      <span id="errorsHeader"><li><c:out value="${error}"/></li></span>
    </html:messages>
    <hr>
</logic:messagesPresent>
<br>
<table width="36%" height="25" id="vtable">
  <tr>
    <th width="47%" nowrap height="24">
      <div align="center"><b>Client MNC</b></div>
    </th>
    <th width="53%" nowrap height="24">
      <div align="center"><b>Deal MNC</b></div>
    </th>
        
    <th width="53%" nowrap height="24">
      <div align="center"><b>Deal Name</b></div>
    </th>
          <th width="53%" nowrap height="24">
      <div align="center"><b>Deal Type</b></div>
    </th>
  </tr>
    <form name="Form1" action="#" method=POST>
      <c:forEach var="dealBean" items="${dealresult}" varStatus="status">
         <c:choose>

          <c:when test="${client != dealBean.ccMNC}" > 
                  <tr class="view">
                        <td nowrap ><c:out value="${dealBean.ccMNC}"/></td>
                        <td nowrap ><a href="#" onClick="submitForm(this.id);return false;" id="<c:out value="${dealBean.dealMNC}"/>"><c:out value="${dealBean.dealMNC}"/></a></td>
                        <td nowrap ><c:out value="${dealBean.dealName}"/></td>
                        <td nowrap ><c:out value="${dealBean.dealTypeName}"/></td>
                        </tr>
                        <c:set var="count" scope="page" value="${0}"/>
          </c:when>
          <c:otherwise > 
                        <c:set var="count" scope="page" value="${count + 1}"/>
                       <c:set var="cellClass">
                     <c:choose>
                        <c:when test="${count % 2 == 1}">alt</c:when>
                        <c:otherwise>alt1</c:otherwise>
                     </c:choose>
                </c:set>
                        <tr class="<c:out value="${cellClass}"/>">
                        <td nowrap ></td>
                        <td nowrap ><a href="#" onClick="submitForm(this.id);return false;" id="<c:out value="${dealBean.dealMNC}"/>"><c:out value="${dealBean.dealMNC}"/></a></td>
                        <td nowrap ><c:out value="${dealBean.dealName}"/></td>
                        <td nowrap ><c:out value="${dealBean.dealTypeName}"/></td>
                        </tr>      
          </c:otherwise>
      </c:choose>
       
          <c:set var="client" value="${dealBean.ccMNC}"/>
    </c:forEach>
</form>
</table>




********************************************************************************
<%@ taglib uri='struts/bean-el' prefix='bean' %>
<%@ taglib uri='struts/html-el' prefix='html' %>
<%@ taglib uri='struts/logic-el' prefix='logic' %>
<%@ taglib uri='jstl/c' prefix='c' %>
<c:set var="count" scope="page" value="0"/>

<div align="left"> <b><font color="#003366"> </font></b></div>
<!-- ========== CONTENT (start) ========== -->
<span class="redbold">Search Deals</span>
<a href="#" onClick="showHide('tbl2','e');return false;"><img id="e" src="./../images/expand.gif" border="0" alt="" width="15" height="15"></a>
<br>
<br>
<table id="tbl2" style= "display: none; border: 0px;position:relative; width="70%" border="0"  width="730">
 
  <tr>
    <td>
      <html:form action="/searchdeal" >
        <table width="309" class="tabTable">
    <tr>
      <td colspan="2" class="tabtitle">Search Deal By:</td>
    </tr>
    <tr>
      <td width="33%" class="right">Client MNC : </td>
      <td width="67%">
        <html:text styleClass="inputtextmedium" property="ccMNC"/>
      </td>
    </tr>
    <tr>
      <td width="33%" class="right"> Deal MNC: </td>
      <td width="67%">
        <html:text styleClass="inputtextmedium" property="dealMNC"/>
      </td>
    </tr>
    <tr>
      <td width="33%" height="46">&nbsp;</td>
      <td width="67%" height="46">
        <!--  <input type="button" class="submitsmall" name="Submit43" value="Search" onClick="window.location='./listdealsresults.jsp';">
        <input type="button" class="submitsmall" name="Button" value="Cancel" onClick="window.location='./home.jsp'">-->
      <html:submit styleClass="submitsmall" value="Search" property="button"/>
      <html:button styleClass="submitsmall" value="Cancel" property="button" onclick="window.location='./home.jsp'"/>
            
            <!-- ========== CONTENT (end) ========== -->
      </td>
    </tr>
  </table>
 </html:form>
     
    </td>
  </tr>
</table>


<hr width="665" align="left">
<span class="bio_listMedium">Deal Search Result : <font size=2 color="red"><c:out value="${matches}"/></font> matches found</span> <br>
<!-- ========== CONTENT (start) ========== -->
<br>

<logic:messagesPresent>
   <hr>
    <span id="errorsHeader"><bean:message key="errors.search.header"/></span>
    <html:messages id="error">
      <span id="errorsHeader"><li><c:out value="${error}"/></li></span>
    </html:messages>
    <hr>
</logic:messagesPresent>
<br>
<table width="36%" height="25" id="vtable">
  <tr>
    <th width="47%" nowrap height="24">
      <div align="center"><b>Client MNC</b></div>
    </th>
    <th width="53%" nowrap height="24">
      <div align="center"><b>Deal MNC</b></div>
    </th>
        
    <th width="53%" nowrap height="24">
      <div align="center"><b>Deal Name</b></div>
    </th>
          <th width="53%" nowrap height="24">
      <div align="center"><b>Deal Type</b></div>
    </th>
  </tr>
    <form name="Form1" action="#" method=POST>
<%
  try
  {
%>
<c:forEach var="dealBean" items="${dealresult}" varStatus="status">
     <h1>Yahoo</h1>
</c:forEach>
<%
  }
  catch( Exception ex )
  {
      ex.printStackTrace();
  }
%>



</form>
</table>

********************************************************************************

Thanx in advance.....let me know if something isnt clear
0
TimYatesCommented:
I can see no reason why this doesn't work :-(

It's as if JSTL doesn't work on Weblogic...

Which version of JSTL are you using?
0
TimYatesCommented:
The first paragraph of this page:

http://www.gideonfamily.org/roller/page/cmdln/20030530

Also says that Weblogic 6.1 is a bit bug ridden...there also seems to be SP5 out...

Can you apply this pack?  It (hopefully) might fix this bug...

-- hehe..  "hopefully" and "might" in one sentence...  do I fill you with confidence? ;-)

Tim
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rahulkothariAuthor Commented:
JSTL 1.0.....
atleast thats what i think i downloaded....how do i make sure what verision it is ??
0
TimYatesCommented:
hmmm....don't know... :-(

JSTL is up to 1.1 now...

That won't fix your problem though (I don't think), as I am starting to get the feeling that it's a problem with the version of Weblogic you are using...

Hmmmmm....

Tim
0
rahulkothariAuthor Commented:
This sucks big time man.....
anyways the solution to the problem was that i replace the outermost JSTL tag (ie c:forEach) with struts logic:iterate tag...works like a charm now.
Thanx for the help anyways.......always good to know that someone is in it with u :)
0
TimYatesCommented:
Glad I could be of some help...even if it was only spiritual ;-)

Good luck with  the project!  Hope it goes smoother from here on in :-)

Tim
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.