Tomcat 5.5 or 6.0 + JSTL 1.2 - fmt:message doesn't work (for me :(   )

I have trolled many forum posts and mailing list threads. I'm sure this question has been asked thousands of times (in fact I've read answers and tried to implement but come up short every time).
Q: How do you make fmt: message work with multiple bundle files?
I have simple test page test.jsp that includes a taglibs fragment. The page attempts to localize a key from a Messages bundle. I get the following as output:
???shoop???
This JSP has been deployed on Tomcat 5.5.23 and Tomcat 6.0.13 with the same result.
I have configured the web.xml many different ways, but currently it's per the 2.4 servlet spec. I have jstl-1.2.jar located in WEB-INF/lib. This is the only webapp library included my deployment. The rest is "vanilla" Tomcat.
I'm including the contents of the important files below.
What could be wrong?
test.jsp
<%@ include file="/taglibs.jsp" %>
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <title>Simple i18n Test</title>
     </head>
     <body>
          <fmt:setBundle var="msgBundle" basename="Messages"/>
          <p><fmt:message key="shoop" bundle="${msgBundle}"/></p>
     </body>
     </html>
taglibs.jsp
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
     <context-param>
          <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
          <param-value>en</param-value>
     </context-param>
     <display-name>test</display-name>
     <welcome-file-list>
          <welcome-file>index.html</welcome-file>
          <welcome-file>index.htm</welcome-file>
          <welcome-file>index.jsp</welcome-file>
          <welcome-file>default.html</welcome-file>
          <welcome-file>default.htm</welcome-file>
          <welcome-file>default.jsp</welcome-file>
     </welcome-file-list>
</web-app>
------------------

Hi all -
evnafets continues to grow his collection of platinum stars. :)
The trick was to set basename in fmt:setBundle to i18n.Messages.Messages. It's not clear from the tag's javadoc, but it appears that the convention is
path.to.bundledirectory.bundledefaultfilenamelessdotpropertiesextension
So, for me
since I have the following deployment structure
WEB-INF/classes/i18n/Messages
Messages.properties
Messages_en.properties
Messages_de.properties
I had to specify
<fmt:setBundle basename="i18n.Messages.Messages" var="msgBundle" />
     <p><fmt:message key="shoop" bundle="${msgBundle}" /></p>
to finally see
shoop
If I add
<fmt:setLocale value="de" /> before all that
I get
der shoop-a-loop
Ha ha!
I would mention that it is not necessary to add the localizationContext in web.xml. It's a convenience if you don't want to specify the default bundle in your JSPs. You cannot define more than one bundle in your web.xml.
I am working with a webapp that has many different bundles, so I'll incurthe overhead of specifying bundle basenames and vars.
Thanks!

Similar Messages

  • JSF and JSTL fmt:message

    I have the following JSP:
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <html>
    Language: <fmt:message key="test.language"/>
    </html>When I run this without faces (http://localhost:8080/myapp/test.jsp), it works fine, the language for the message is choosen by the browsers language setting. If I run this thru faces servlet (http://localhost:8080/myapp/faces/test.jsp) the message is english always and the browser setting is ignored (english is the default language of the VM running tomcat).
    It may be a problem in JSTL because request.getLocale() returns the correct locale in both cases.
    Any ideas?
    I tried JSTL 1.0.5, Tomat 4.1.30 and 5.0.19
    Thanks a lot
    Andreas

    JSF sets the locale for the view to the locale specified by the Accept-Language request header (i.e., the user's browser language setting) that is the best match for the locales defined as the default or supported locales in faces-config.xml, or to the JVM default locale if none of them matches. The selected locale is made available for JSTL i18n actions (when you use JSP for the view), so as long as you define all locales you support in faces-config.xml, your page shouldwork fine.

  • Tomcat 4.0.x and JSP / JSTL performance problems.

    Hello everyone,
    I've got a web application where some of my JSP pages are rendering quite slowly. As an example I'll use a JSP page that I wrote for browsing through a user database. It uses two beans...
    1. jobBean - Ensures that all of the required (and correct) beans that will be used for processing the request have been loaded.
    2. browserBean - A basic JavaBean that holds a set of UserBean(s) and other information pertinent to database queries (start, limit, order).
    I'm using Apache Struts to map requests to the appropriate processing modules. Now the problem I'm having is that each request is taking between 1 and 2 seconds to execute. As you can imagine that's not going to allow for very many simaltaneous users. I've tracked the problem down to something JSP related. All of my code executes fairly quickly (I think). It takes about 20-30ms for my code to identify the request, load the requested data from the database, and convert it into a usable format (the browserBean). Here's my code...
    <%@ page contentType="text/html"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <META http-equiv="Cache-Control" content="no-cache">
    <title>
    Browse Users
    </title>
    </head>
    <body>
    <!-- Set up the OrganizationBeans for use -->
    <jsp:useBean id="jobBean" class="com.vacode.jobs.generic.JobBean" scope="session" />
    <jsp:useBean id="browserBean" class="com.vacode.mqdb.beansets.user.UserBrowserBean" scope="session" />
    <!---------------------------->
    <!-- Start Time Logged Here -->
    <!---------------------------->
    <c:if test="${jobBean.currentJob.name != 'BrowseUserJob'}">
         <!-- This page was accessed before everything was properly initialized -->
         <c:url var="browseUser" value="manageUsers.do">
              <c:param name="action" value="browse" />
         </c:url>
         <c:redirect url="${browseUser}" />
    </c:if>
    <form action="manageUsers.do" method="get">
         <input type="hidden" name="action" value="browse">
         <input type="hidden" name="start" value="<c:out value="${browserBean.dummyStart}" />">
         <input type="hidden" name="order" value="<c:out value="${browserBean.order}" />">
         I would like to view
         <select name="limit">
              <c:forEach begin="1" end="5" var="current">
                   <option value="<c:out value="${current*5}" />"
                        <c:if test="${browserBean.dummyLimit == current*5}">
                        selected
                        </c:if>
                   >
                    <c:out value="${current*5}" />
                   </option>
              </c:forEach>
         </select>
         results per page.
         <input type="submit" action="submit">
    </form>
    <c:url var="id" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_ID" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="name" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="firstName" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_FIRST_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="lastName" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_LAST_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="email" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_EMAIL_ADDRESS" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="organization" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_ORGANIZATION_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="status" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_STATUS_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="role" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="ROLE_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <table>
         <tr>
              <td><a href="<c:out value="${id}" />">Id</a></td>
              <td><a href="<c:out value="${name}" />">User Name</a></td>
              <td><a href="<c:out value="${firstName}" />">First Name</a></td>
              <td><a href="<c:out value="${lastName}" />">Last Name</a></td>
              <td><a href="<c:out value="${email}" />">E-Mail</a></td>
              <td><a href="<c:out value="${organization}" />">Organization</a></td>
              <td><a href="<c:out value="${status}" />">Status</a></td>
              <td><a href="<c:out value="${role}" />">User Type</a></td>
         </tr>
    <c:forEach items="${browserBean.beans}" var="bean">
         <tr>
              <c:url var="manage" value="manageUsers.do">
                   <c:param name="action" value="modify" />
                   <c:param name="beanId" value="${bean.userId}" />
              </c:url>
              <td><a href="<c:out value="${manage}" />"><c:out value="${bean.userId}" /></a></td>
              <td><c:out value="${bean.userName}" /></td>
              <td><c:out value="${bean.firstName}" /></td>
              <td><c:out value="${bean.firstName}" /></td>
              <td><c:out value="${bean.email}" /></td>
              <td><c:out value="${bean.organizationName}" /></td>
              <td><c:out value="${bean.statusName}" /></td>
              <td><c:out value="${bean.roleName}" /></td>
         </tr>
    </c:forEach>
    <!-------------------------->
    <!-- End Time Logged Here -->
    <!-------------------------->
    </table>
    <c:url var="next" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="${browserBean.nextPageStart}" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
         <c:param name="order" value="${browserBean.order}" />
    </c:url>
    <c:url var="previous" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="${browserBean.previousPageStart}" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
         <c:param name="order" value="${browserBean.order}" />
    </c:url>
    <c:if test="${browserBean.previousPageStart>-1}">
         <a href="<c:out value="${previous}" escapeXml="false" />">previous</a>
    </c:if>
    <c:if test="${browserBean.nextPageStart>-1}">
         <a href="<c:out value="${next}" escapeXml="false" />">next</a>
    </c:if>
    <br>
    <br>
    Quick Jump To Page:
    <c:forEach varStatus="loopTag" items="${browserBean.pageStartValues}" var="current">
    <c:choose>
         <c:when test="${loopTag.index+1==browserBean.currentPageNumber}">
              <c:out value="${loopTag.index+1}" />
         </c:when>
         <c:otherwise>
         <c:url var="thisPage" value="manageUsers.do">
              <c:param name="action" value="browse" />
              <c:param name="start" value="${current}" />
              <c:param name="limit" value="${browserBean.dummyLimit}" />
              <c:param name="order" value="${browserBean.order}" />
         </c:url>
         <a href="<c:out value="${thisPage}" />"><c:out value="${loopTag.index+1}" /></a>
         </c:otherwise>
    </c:choose>
    </c:forEach>
    <br>
    <br>
    Max Possible Pages: <c:out value="${browserBean.maxNumberOfPages}" />
    <br>
    Current Page: <c:out value="${browserBean.currentPageNumber}" />
    </body>
    </html>I've added comments where I timed my code from (by writing new Date().getTime() to the console). It usually takes between 1 and 2 seconds for that block of JSP to execute. I wrote a test class that should be very similar to the process (iterating over the forEach loop mainly) and it usually executed in 10ms to 20ms.
    I had a look at the servlets that were generated by Tomcat and I noticed that for each <c:url> I used there's about 300 lines of code (with several syncronized() methods). Could this have anything to do with it? If so, what could I do to improve the performance?
    Worth mentioning... The machine I am using is an AMD Athlon 1GHZ with 768MB RAM, 7200 RPM UDMA100 IDE HDD.
    I'm also using Tomcat integrated with a development environment (IntelliJ IDEA).
    Any help that anyone could offer is much appreciated.
    Thanks,
    Ryan

    Can you get acceptable performance if you hack out everything except the browserBean forEach loop? Maybe you are trying to do too much runtime EL evaluation on the page.
    If performance improves, you may want to push the URL construction and startValue computations to a Struts Action and put a bunch of objects on the requestScope (like "id_url", "name_url", "pageStartValue").
    Putting these computations in the Action would avoid having JSTL parse each of the ${} arguments, evaluating the expressions, and using costly reflection to turn ${browserBean.order} into browserBean.getOrder().

  • Value="${bean.param}" doesn't work on tomcat 5, WHY ?

    Hello,
    I have a web application with jsf 1.1. My application has to play some flash movies. Here is my playMovie.jsp :
    <h:form id="form"  onkeydown="return sendInfo(event);">
           <h:commandButton id="redirect" action="#{marketTest.whichSessionAction}" style="visibility:hidden;"/>
           <h:outputLabel id="videoName" value="#{marketTest.videoName}" style="visibility:hidden;"/>
           <f:verbatim>
              <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
                      codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
                      width="800" height="600" id="market" align="middle">
                  <param name="allowFullScreen" value="false" />
                  <param name="movie" value="${marketTest.videoName}" />
                  <param name="menu" value="false" />
                  <param name="quality" value="high" />
                  <param name="bgcolor" value="#000000" />
                  <param name="loop" value="false" />
                  <embed src="${marketTest.videoName}" menu="false" quality="high" bgcolor="#000000" width="800" height="600" name="market" align="middle"
                         loop="false" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>
             </object>
             <br/>
           </f:verbatim>
            <h:outputText value="#{marketTest.userPosText}"/>
         </h:form>I test it on my computer where I have tomcat 6 and it works very well, but when I put the application on the server where is installed tomcat 5, I have no movies and when I looked at the source page I saw that ${marketTest.videoName} wasn't translated to the real movie name.
    Does someone know what can I do ?
    Thanks in advance.

    EL in template text only works on Servlet 2.4 / JSP 2.0 and newer. So you need at least Tomcat 5.5. Tomcat 5.0 is Servlet 2.3 / JSP 1.2 and Tomcat 6.0 is Servlet 2.5 / JSP 2.1.
    To fix this, use JSTL c:out tag. This problem is by the way not related to JSF.

  • JNI Works for application, but not when used over Tomcat...

    I am having problems getting JNI to work when I try to run a Servlet that invokes native calls.
    I have a small, simple java program, just to test the waters, that simple calls a small shared library. It works like magic when I run the program as a simple application.
    However, when I turn it into a Servlet, I get the following runtime errors:
    The first time I call the Servlet:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.native)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
         at java.security.AccessController.checkPermission(AccessController.java:399)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
         at java.lang.SecurityManager.checkLink(SecurityManager.java:837)
         at java.lang.Runtime.loadLibrary0(Runtime.java:743)
         at java.lang.System.loadLibrary(System.java:820)
         at Native.(NativeApp.java:24)
         at NativeApp.service(NativeApp.java:15)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
         at java.lang.Thread.run(Thread.java:484)
    On hitting reload (F5), I get this:
    java.lang.NoClassDefFoundError
         at NativeApp.service(NativeApp.java:15)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
         at java.lang.Thread.run(Thread.java:484)
    Before going and farther, here is the server specs:
    Linux (cobalt, basically red hat)
    java 1.3
    recent version of tomcat
    Now, just to be sure, I removed the native call from the servlet, and ran it again...no problem this time. So I know that it has to be the native call that is causing this.
    I have to say that I am still a bit new to JNI (book is in the mail form amazon still, hehe)...any ideas would really be appreciated.
    I have a feeling that this may have little or nothing to do with JNI...but it seems to be related in some way.
    -Zach

    Well, I have came to the same conclusion, that the problem that I am having is directly related to the security policy that Tomcat runs under.
    However, I have not been able to figure out exactly what I need to change....
    I have altered the tomcat.policy file in a number of ways, including (for testing purposes) allowing full permission on the site that has the JNI servlet on it.
    I have also done the same for the folder containing the shared library, I don't know if mattered, but I tried to be sure.
    At this point, I have ordered a number of books from Amazon that should (hopefully) have some answers, but it is still a bit confusing that after allowing all permissions (and rebooting) that it still failed to work.
    Dose anyone know how that you would allow native methods to be called in a policy file?
    Thanks again for any suggestions!
    -Zach

  • Web service doesn't work on tomcat server

    I uploaded the war file to tomcat server.
    The structure as follows:
    <MyWebServiceName>\classes (all the complied class files)
    <MyWebServiceName>\wsdl (The generated wsdl file is in this folder)
    <MyWebServiceName>\web.xml
    But I can not get wsdl file from the url:
    http://localhost:8080/<MyWebServiceName>/<MyWebServiceName>?wsdl
    The error is the requested resource is not available.
    I deloyed some other sample web services, they all work well. But I can not find any wsdl file for these web services on tomcat server. It is very strange.
    Anyone can help me?

    Toshiba knowledge base - how to fix webcam - http://forums.toshiba.com/t5/Video-Display-Knowled​ge-Base/How-can-I-fix-my-webcam/ta-p/281393
    Here is another post that gives some suggestions - http://www.pcauthorities.com/pc-errors/how-to-fix-​webcam-problems/
    S70-ABT2N22 Windows 7 Pro & 8.1Pro, C55-A5180 Windows 8.1****Click on White “Kudos” STAR to say thanks!****

  • Jsp:include doesn't work with Tomcat & IIS

    Hi, Guys,
    I installed IIS4.0 and Tomcat in my windows NT system. http://localhost/examples/jsp/index.html works fine.
    When I load http://localhost:8080/about.jsp, it's also working fine. But when I load http://localhost/about.jsp, it will ignore the part which the line is display as
    <%String topName = "/servlet/topServlet";%>
    <jsp:include page="<%=topName%>" flush="true"/>
    The other part will work just as a html file. And I didn't get any error message.
    Would can tell me how to figure out this problem. Thank in advanced very much!

    Oh, God, why not tell me earlier!!!!!! I do use tomcat 3.1 and it just support servlet. I have no way out but modify all my jsp:include to encoding into a servlet page. I almost re-do all my work. But anyway, thank you! Next time I will know.

  • First webService -- "VERSION" doesn't work... (Tomcat and Axis2)

    Hi,
    I installed Tomcat 5.5 (Checked it and it works).
    Installed axis2.war (put it in the right directory "webapps" and it works).
    So I tried to see the webservice that comes with the axis2 war file, it's name is version and the management web interface of axis2 - recognizes it and says that it functions.
    BUT
    When I try to see it with the following URL:
    http://localhost:8080/axis2/services/version
    it returns the following error:
    "Requested resource not found!"
    when I try this line:
    http://localhost:8080/axis2/rest/version
    it returns the following error:
    "Internal server error"
    BUT when I try this line:
    http://localhost:8080/axis2/services/version?wsdl
    It returns me the WSDL!
    Why can't I see the webService??
    Please, any help will be happily accepted.

    I'm getting similar result except no WSDL. However if I hit
    http://localhost/axis2/axis2-web/HappyAxis.jsp
    it reports that version was called successfully. I digged in JSP, but couldn't understand what request was sent.
    Message was edited by:
    dmitryr

  • ADF + Tomcat: what does/doesn't work?

    Is there a handy list anywhere of which technologies will work under Tomcat?

    Hi,
    there is an ADF Runtime installer for Tomcat as part of JDev. It does work with Tomcat.
    See the ADF Developers Guide section: 34.10 Deploying to Tomcat
    http://download.oracle.com/docs/pdf/B25947_01.pdf
    It's worth noting that the licence for ADF is around the same cost of the Application Server 10g which includes an ADF licence so it often makes more sense to buy a server licence and get the benefits of the Enterprise Manager Console.
    Brenden

  • JSTL comparision doesn't work with jdeveloper 10.1.2.2.0

    Hi,
    can somebody explain me why comparision are not working with JSTL. I quess reason is the type of the variables, but how can I solve it?
    Is the anyway to cast to same object-type?
    I try also compare directly with bindings, but didn't work either. That why I use temporary page scope variables.
    <c:set var="comp2" value="${bindings.Organisation}" scope="page" />
    <!-- prints "-203-", which is correct -->
    <tr><td> </td><td>
    -<c:out value="${comp2}"/>-
    </td></tr>
    <!-- loop over possible values -->     
    <c:forEach var="RowTL" items="${bindings.OrganisationCode.rangeSet}" >
    <c:set var="comp1" value="${RowTL.KarvTunnusnumero}" scope="page" />
         <!-- print "-203-11" when reach correct item which should match -->
    <tr><td> </td><td>
    -<c:out value="${comp1}"/>-<c:out value="${RowTL.KarvKoodiarvo}"/>
         <!---- true always with fixed value - not reasonable -->
    <c:if test="${comp2 == '203' }">
    <c:out value="11111111"/>
    </c:if>
         <!---- true with correct item, with fixed value - not reasonable -->
    <c:if test="${comp1 == '203' }">
    <c:out value="22222222"/>
    </c:if>
         <!---- false always althouhg printed values with correct item are "203" = "203" -->
    <c:if test="${comp1 == comp2 }">
    <c:out value="33333333"/>
    </c:if>
         <!---- false always althouhg printed values with correct item are "203" = "203" -->
    <c:if test="${comp2 == comp1 }">
    <c:out value="4444444"/>
    </c:if>
    </td></tr>
    </c:forEach>
    thanks PLa

    Works fine, thanks,
    Now it is comparing wtih string values I guess.
    Do you know any good source where can I read about those object types of bindings? I tried also debugger to investicate the structure of object, but debugger didn't show anything.

  • Help!!!Tomcat doesn't work

    win2000+tomcat 5.0.19;
    after installed tomcat i use the follow application to test it.
    import java.io.*;
    &#12288;&#12288;import javax.servlet.*;
    &#12288;&#12288;import javax.servlet.http.*;
    &#12288;&#12288;public class HelloWorld extends HttpServlet
    &#12288;&#12288;public void doGet(HttpServletRequestrequest,HttpServletResponseresponse)throws ServletException,IOException
    &#12288;&#12288;{
    &#12288;&#12288;
    &#12288;&#12288;response.setContentType("text/html");
    &#12288;&#12288;PrintWriterout=response.getWriter();
    &#12288;&#12288;out.println("<html><head><title>");
    &#12288;&#12288;out.println("ThisismyfirstServlet");
    &#12288;&#12288;out.println("</title></head><body>");
    &#12288;&#12288;out.println("<h1>Hello,World!</h1>");
    &#12288;&#12288;out.println("</body></html>");
    &#12288;&#12288;
    &#12288;&#12288;}
    &#12288;&#12288;}
    The compiler shows:
    HelloWorld.java:2: illegal character: \12288
    &#12288;&#12288;import javax.servlet.*;
    ^
    HelloWorld.java:2: illegal character: \12288
    &#12288;&#12288;import javax.servlet.*;
    ^
    HelloWorld.java:3: illegal character: \12288
    &#12288;&#12288;import javax.servlet.http.*;
    ^
    HelloWorld.java:3: illegal character: \12288
    &#12288;&#12288;import javax.servlet.http.*;
    ^
    HelloWorld.java:4: illegal character: \12288
    &#12288;&#12288;public class HelloWorld extends HttpServlet
    ^
    HelloWorld.java:4: illegal character: \12288
    &#12288;&#12288;public class HelloWorld extends HttpServlet
    ^
    HelloWorld.java:7: illegal character: \12288
    &#12288;&#12288;public void doGet(HttpServletRequestrequest,HttpServletResponseresponse)thro
    ws ServletException,IOException
    ^
    HelloWorld.java:7: illegal character: \12288
    &#12288;&#12288;public void doGet(HttpServletRequestrequest,HttpServletResponseresponse)thro
    ws ServletException,IOException
    ^
    HelloWorld.java:8: illegal character: \12288
    &#12288;&#12288;{
    ^
    HelloWorld.java:8: illegal character: \12288
    &#12288;&#12288;{
    ^
    HelloWorld.java:9: illegal character: \12288
    &#12288;&#12288;
    ^
    HelloWorld.java:9: illegal character: \12288
    &#12288;&#12288;
    ^
    HelloWorld.java:10: illegal character: \12288
    &#12288;&#12288;response.setContentType("text/html");
    ^
    HelloWorld.java:10: illegal character: \12288
    &#12288;&#12288;response.setContentType("text/html");
    ^
    HelloWorld.java:11: illegal character: \12288
    &#12288;&#12288;PrintWriterout=response.getWriter();
    ^
    HelloWorld.java:11: illegal character: \12288
    &#12288;&#12288;PrintWriterout=response.getWriter();
    ^
    HelloWorld.java:12: illegal character: \12288
    &#12288;&#12288;out.println("<html><head><title>");
    ^
    HelloWorld.java:12: illegal character: \12288
    &#12288;&#12288;out.println("<html><head><title>");
    ^
    HelloWorld.java:13: illegal character: \12288
    &#12288;&#12288;out.println("ThisismyfirstServlet");
    ^
    HelloWorld.java:13: illegal character: \12288
    &#12288;&#12288;out.println("ThisismyfirstServlet");
    ^
    HelloWorld.java:14: illegal character: \12288
    &#12288;&#12288;out.println("</title></head><body>");
    ^
    HelloWorld.java:14: illegal character: \12288
    &#12288;&#12288;out.println("</title></head><body>");
    ^
    HelloWorld.java:15: illegal character: \12288
    &#12288;&#12288;out.println("<h1>Hello,World!</h1>");
    ^
    HelloWorld.java:15: illegal character: \12288
    &#12288;&#12288;out.println("<h1>Hello,World!</h1>");
    ^
    HelloWorld.java:16: illegal character: \12288
    &#12288;&#12288;out.println("</body></html>");
    ^
    HelloWorld.java:16: illegal character: \12288
    &#12288;&#12288;out.println("</body></html>");
    ^
    HelloWorld.java:17: illegal character: \12288
    &#12288;&#12288;
    ^
    HelloWorld.java:17: illegal character: \12288
    &#12288;&#12288;
    ^
    HelloWorld.java:18: illegal character: \12288
    &#12288;&#12288;}
    ^
    HelloWorld.java:18: illegal character: \12288
    &#12288;&#12288;}
    ^
    HelloWorld.java:19: illegal character: \12288
    &#12288;&#12288;}
    ^
    HelloWorld.java:19: illegal character: \12288
    &#12288;&#12288;}
    ^
    HelloWorld.java:19: <identifier> expected
    &#12288;&#12288;}
    ^
    HelloWorld.java:20: illegal character: \12288
    &#12288;&#12288;
    ^
    HelloWorld.java:20: illegal character: \12288
    &#12288;&#12288;
    ^
    HelloWorld.java:21: 'class' or 'interface' expected
    ^
    36 errors
    what is the problem??
    &#12288;&#12288;

    You're editor is inserting nasties into your code. Are you using a real editor or a Word processor?

  • Why jstl doesn't work in some browser?

    I am writing a wml page:
    but,
    <fmt:formatDate value="${now}" pattern="yyyy-MM-dd"/>doesn't now work in some browser, for example: m3gate simulator and my handset...(I get 2006-9-27 00:00:00.000,but <c: forEach> still works)
    but it works on opera simulator(I get 2006-9-27)
    I thought the jstl shuld be the server-side behavior .
    I am confused.
    Thank you and sorry for my poor English.

    The JSP pages that are generated by the IDE are in XML format. You cannot mix JSP and XML syntax in a page. To learn the XML equivalents of JSP syntax, see: http://java.sun.com/products/jsp/syntax/1.2/card12.pdf
    For information about JavaServer Faces EL
    see
    http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html (Mixing JSF and Non-JSF Tag Libraries)
    http://developers.sun.com/prodtech/javatools/jscreator/reference/docs/help/jsp-jsfel/jsf_expression_language_intro.html
    http://java.sun.com/developer/technicalArticles/J2EE/jsf_12/ (Changes to come)

  • Tomcat autoreload doesn't work

    I am using Tomcat 4.1.24 on W2K OS. Every time when I modify a servlet, I need to restart Tomcat to see the changes. I already set the reloadable to true. Here is the part of the server.xml config file:
    <Context path="" docBase="laguna" debug="0" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_laguna_log." suffix=".txt" timestamp="true"/>
    </Context>
    Is this a known bug in Tomcat? Anyone suggest a fix for this?

    To turn on servlet reloading, edit install_dir/conf/server.xml and add a DefaultContext subelement to the main Service element and supply true for the reloadable attribute. The easiest way to do this is to find the following comment:
    <!-- Define properties for each web application. This is only needed
    if you want to set non-default properties, or have web application
    document roots in places other than the virtual host's appBase
    directory. -->
    and insert the following line just below it:
    <DefaultContext reloadable="true"/>
    Hope it helps.

  • Tomcat server not working for OTM

    Hi
    we are using Oracle Transportation management
    we are getting the following error when i checked in error.log of apache
    [Thu May 14 12:43:22 2009] [error] [client 10.201.51.16] File does not exist: /opt/otm/apache/htdocs/images/themes/themesswanorange/dis-btn-bg.gif, referer: http://appsnet1.wiprosupport.com/GC3/LocationCustManagement/1242322904715?management_action=edit&manager_layout_gid=LOCATION&step=LocationRoles
    the following error is shown in mod_jk.log
    [Thu May 14 10:15:54 2009] [error] ajp_service::jk_ajp_common.c (1758): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=ajp13 failed
    [Thu May 14 10:16:10 2009] [error] ajp_service::jk_ajp_common.c (1758): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=ajp13 failed
    can you please help to resolve this issue,as its on high priority.
    Regards,
    pradeep

    Well this forum is neither for Tomcat and nor for OTM. This is Oracle Application Server forum. To get fast and meaningful response post in the appropriate forum. I am not sure which one (as I am not at all familiar with OTM) but you can try looking in one of either EBS or Industries forums:
    http://forums.oracle.com/forums/category.jspa?categoryID=3
    http://forums.oracle.com/forums/category.jspa?categoryID=150

  • JSTL issue using fmt:setLocale ... tag

    Hi, we're working on internationalizing a set of jsp pages, and we are attempting to use the JSTL tag set for this. We are able to have the values read from the default properties file, but the values are not being picked up from the locale specific file. The code below looks as such:
    <fmt:setBundle basename="SystemAdmin" var="systemAdmin" scope="session" />
    <fmt:setLocale value="EN" scope="session" />
    Does anyone have any experience with this and why the SystemAdmin_EN.properties file wouldn't be picked?
    Thanks!
    Rango Keshavan
    [email protected]

    It might help to reverse the order of these two commands.
    ie set the locale BEFORE you look up the resource bundle

Maybe you are looking for

  • I forgot my security answer can you help me

    i forgot my security answer can you help me

  • Display columns from two tables without making join

    Hi, I need to perform currency conversion in the report. For eg:) Whatever the currency in ar_payment_schedules i want to convert it to INR equivalent. Following is the query to do this. select ps.invoice_currency_code Currency_B,      decode(ps.invo

  • Applications: How does OS X Know Which App to Reference a File to?

    I just got my new Macbook and while installing applications, a question I've had for a while came up again. How does OS X know to reference applications to certain file types? For example. I have a .avi I downloaded to watch, and downloaded VLC to wa

  • Thinkvanta​ge system update setup error 742

    Hi all, We have problem using system update on our machines. We have many different lenovo models T4x, T6x, X4, X6, All have same problem when tying to update. Error message says: setup error 742 The Source folder command line option (/s) must includ

  • OSX 10.9.4 and Quicken 2007

    I am running 10.9.4 on a new mac and wanted to install my Quicken 2007 but when I insert the disk it says it does not support power pc programs.  However, I have seen posts that Quicken 2007 runs fine on 10.9.4?  What do I do now?