IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New fmt:message inside c:forEach on JBoss4
I'm building an internationalized web app that needs to be deployed on JBoss 4.0.1SP1. It's my understanding that JB4 comes with Tomcat 5.0.28 inside it. More on that later.

So I have my JSP page, and it contains the following code:
<span align="left">\n  <fmt:message key="OrderList.Label.PlaceNewOrder" bundle="${myResources}" />\n  <select name="orderType">\n    <option selected value="0"><Select Order Type></option>\n    <c:forEach items="${OrderListForm.orderTypeList}" var="result">\n      <%--\n      <option value="${result.id}">1</option>\n      --%>\n      <option value="${result.id}">\n        <fmt:message key="${result.description}" bundle="${myResources}" />\n      </option>\n    </c:forEach>\n  </select>\n</span>

When I go to view this JSP page inside JB4, I receive the following error:

An exception of the class javax.servlet.jsp.JspException: ServletException in '/jsp/oe/OrderList.jsp': Unable to compile class for JSP Generated servlet error: /usr/local/jboss-4.0.1sp1/server/default/work/jboss.web/localhost/_/org/apache/jsp/jsp/oe/OrderList_jsp.java:176: _jspx_meth_fmt_message_1(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext,int[]) in org.apache.jsp.jsp.oe.OrderList_jsp cannot be applied to (org.apache.taglibs.standard.tag.rt.core.ForEachTag,javax.servlet.jsp.PageContext,int[]) if (_jspx_meth_fmt_message_1(_jspx_th_c_forEach_0, _jspx_page_context, _jspx_push_body_count_c_forEach_0)) ^ 1 error arose

If, however, I enable the line just containing "1" for the displayed value, and comment out the fmt:message and surrounding option tags, the code works and displays beautifully inside JB4. A quick view of the source even shows that ${result.id} is changing as expected.

So, back to Tomcat, as mentioned above. I went out and downloaded Tomcat 5.0.28 from the Jakarta site and installed it locally. I deployed the exact same .war file that's in my JB server/default/deploy directory, and went to the same Order List page as above (with the fmt:message enabled). TC5.0.28 is able to display this page correctly, with no problems.

What am I doing wrong? Why does the same .war file work in standalone Tomcat 5.0.28, but fails inside JBoss (which contains Tomcat 5.0.28)?

Edit: Reformatted so that perhaps Todd can read it.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
Expand Edited by Yendor April 20, 2005, 04:03:05 PM EDT
Expand Edited by Yendor April 20, 2005, 10:27:57 PM EDT
New 5.0.28 in JBoss ~= 5.0.28 standalone
I'd post on the JBoss list.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Already have. No replies as yet.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New Ach, how could a computer read that much less a human?



"Whenever you find you are on the side of the majority, it is time to pause and reflect"   --Mark Twain

"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."   --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."   --George W. Bush
     fmt:message inside c:forEach on JBoss4 - (Yendor) - (3)
         5.0.28 in JBoss ~= 5.0.28 standalone - (admin) - (1)
             Already have. No replies as yet. -NT - (Yendor)
         Ach, how could a computer read that much less a human? -NT - (tuberculosis)

And suddenly it occurred to me where these guys had learned their tactics. They'd seen Beau Geste, and were copying the Foreign Legionaires at Fort Zinderneuf.
132 ms