You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by clunkyrobot <cl...@fastmail.fm> on 2004/09/06 15:32:50 UTC

EL expression not evaluating

Hi - I am building a blog in the JSP and JSTL and EL and Tomcat and 
MySQL.

  So far I have installed Tomcat 5, with MySQL 4.x.x, and the Jakarta 
Core Tags version 2, all seems to be functioning. I am using Intellij 
IDEA 4.5 as my IDE. Now all seems to be running fine, no errors, 
Intellij IDEA is configured and sees what it needs, and look happy.

  Problem 01 - My EL expressions in my <c:out value="${some Expression}" 
/> are not being evaluated, they look right but the expressions are 
just printed out on the screen like this ${some Expression} as plain 
text. Now it is not a problem with my tags because my <c:choose> tags 
and others work fine. So it looks my core tags are working, but why are 
my expressions not being executed?

  Here is the page any suggestions?

-Kurt

code:


<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/sql.tld" prefix="sql" %>
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/x.tld" prefix="x" %>

<html>
   <head>
     <title>Search Result</title>
   </head>
   <body bgcolor="white">

       <p>Create a <a href="newCreate.jsp">new Blog</a></p>

   <c:choose>
     <c:when test="${not empty listQuery.rows}">
       Sorry, no existing blogs were found.
     </c:when>
     <c:otherwise>

       The following soapbox articles were found:

         <table border="1">
             <th>ID</th>
             <th>Date Created</th>
             <th>Date Last Modified</th>
             <th>Article Status</th>
             <th>Article Title</th>
             <th>Article Summery</th>
             <th>Edit</th>
             <th>Delete</th>

             <c:forEach items="${listQuery.rows}" var="row">
             <tr>
             <td><c:out value="${row.id}" /></td>
             <td><c:out value="${row.dateCreated}" /></td>
             <td><c:out value="${row.dateLastModified}" /></td>
             <td><c:out value="${row.articleStatus}" /></td>
             <td><c:out value="${row.articleTitle}" /></td>
             <td><c:out value="${row.articleSummery}" /></td>
             <td><a href="currentQuery.jsp?id=<c:out value="${row.id}" 
/>">Edit</a></td>
             <td><a href="delete.jsp?id=<c:out value="${row.id}" 
/>">Delete</a></td>
             </tr>
             </c:forEach>
         </table>

     </c:otherwise>
   </c:choose>

   </body>
</html>

Re: EL expression not evaluating

Posted by Dima Gutzeit <di...@mailvision.net>.
Replace the following :

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web 
 Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
 
 <web-app>

With the value from my first reply.

----- Original Message ----- 
From: "clunkyrobot" <cl...@fastmail.fm>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Monday, September 06, 2004 17:39
Subject: Re: EL expression not evaluating


> This is my web.xml
> 
> ============================
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web 
> Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
> 
> <web-app>
> 
>      <!-- makes MySQL driver accessible -->
>        <context-param>
>        <param-name>
>        javax.servlet.jsp.jstl.sql.dataSource
>        </param-name>
>        <param-value>
>        
> jdbc:mysql://localhost/scuttlebug,com.mysql.jdbc.Driver,guest,guest
>        </param-value>
>        </context-param>
> 
> </web-app>
> ============================
> 
> 
> Very basic - I tried adding Dima XML however to no effect?
> 
> Can anyone see some thing I am missing:
> 
> On 06/09/2004, at 11:54 PM, Dima Gutzeit wrote:
> 
> > Hi,
> >
> > Take a look on the web.xml file of your application. It should begin 
> > with
> > the following :
> >
> > <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" >
> >
> > Hope it helps.
> >
> >
> >
> > ----- Original Message -----
> > From: "clunkyrobot" <cl...@fastmail.fm>
> > To: <ta...@jakarta.apache.org>
> > Sent: Monday, September 06, 2004 16:32
> > Subject: EL expression not evaluating
> >
> >
> >> Hi - I am building a blog in the JSP and JSTL and EL and Tomcat and
> >> MySQL.
> >>
> >>   So far I have installed Tomcat 5, with MySQL 4.x.x, and the Jakarta
> >> Core Tags version 2, all seems to be functioning. I am using Intellij
> >> IDEA 4.5 as my IDE. Now all seems to be running fine, no errors,
> >> Intellij IDEA is configured and sees what it needs, and look happy.
> >>
> >>   Problem 01 - My EL expressions in my <c:out value="${some 
> >> Expression}"
> >> /> are not being evaluated, they look right but the expressions are
> >> just printed out on the screen like this ${some Expression} as plain
> >> text. Now it is not a problem with my tags because my <c:choose> tags
> >> and others work fine. So it looks my core tags are working, but why 
> >> are
> >> my expressions not being executed?
> >>
> >>   Here is the page any suggestions?
> >>
> >> -Kurt
> >>
> >> code:
> >>
> >>
> >> <%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
> >> <%@ taglib uri="/WEB-INF/tld/sql.tld" prefix="sql" %>
> >> <%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
> >> <%@ taglib uri="/WEB-INF/tld/x.tld" prefix="x" %>
> >>
> >> <html>
> >>    <head>
> >>      <title>Search Result</title>
> >>    </head>
> >>    <body bgcolor="white">
> >>
> >>        <p>Create a <a href="newCreate.jsp">new Blog</a></p>
> >>
> >>    <c:choose>
> >>      <c:when test="${not empty listQuery.rows}">
> >>        Sorry, no existing blogs were found.
> >>      </c:when>
> >>      <c:otherwise>
> >>
> >>        The following soapbox articles were found:
> >>
> >>          <table border="1">
> >>              <th>ID</th>
> >>              <th>Date Created</th>
> >>              <th>Date Last Modified</th>
> >>              <th>Article Status</th>
> >>              <th>Article Title</th>
> >>              <th>Article Summery</th>
> >>              <th>Edit</th>
> >>              <th>Delete</th>
> >>
> >>              <c:forEach items="${listQuery.rows}" var="row">
> >>              <tr>
> >>              <td><c:out value="${row.id}" /></td>
> >>              <td><c:out value="${row.dateCreated}" /></td>
> >>              <td><c:out value="${row.dateLastModified}" /></td>
> >>              <td><c:out value="${row.articleStatus}" /></td>
> >>              <td><c:out value="${row.articleTitle}" /></td>
> >>              <td><c:out value="${row.articleSummery}" /></td>
> >>              <td><a href="currentQuery.jsp?id=<c:out value="${row.id}"
> >> />">Edit</a></td>
> >>              <td><a href="delete.jsp?id=<c:out value="${row.id}"
> >> />">Delete</a></td>
> >>              </tr>
> >>              </c:forEach>
> >>          </table>
> >>
> >>      </c:otherwise>
> >>    </c:choose>
> >>
> >>    </body>
> >> </html>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 


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


Re: EL expression not evaluating

Posted by clunkyrobot <cl...@fastmail.fm>.
This is my web.xml

============================
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web 
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

     <!-- makes MySQL driver accessible -->
       <context-param>
       <param-name>
       javax.servlet.jsp.jstl.sql.dataSource
       </param-name>
       <param-value>
       
jdbc:mysql://localhost/scuttlebug,com.mysql.jdbc.Driver,guest,guest
       </param-value>
       </context-param>

</web-app>
============================


Very basic - I tried adding Dima XML however to no effect?

Can anyone see some thing I am missing:

On 06/09/2004, at 11:54 PM, Dima Gutzeit wrote:

> Hi,
>
> Take a look on the web.xml file of your application. It should begin 
> with
> the following :
>
> <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" >
>
> Hope it helps.
>
>
>
> ----- Original Message -----
> From: "clunkyrobot" <cl...@fastmail.fm>
> To: <ta...@jakarta.apache.org>
> Sent: Monday, September 06, 2004 16:32
> Subject: EL expression not evaluating
>
>
>> Hi - I am building a blog in the JSP and JSTL and EL and Tomcat and
>> MySQL.
>>
>>   So far I have installed Tomcat 5, with MySQL 4.x.x, and the Jakarta
>> Core Tags version 2, all seems to be functioning. I am using Intellij
>> IDEA 4.5 as my IDE. Now all seems to be running fine, no errors,
>> Intellij IDEA is configured and sees what it needs, and look happy.
>>
>>   Problem 01 - My EL expressions in my <c:out value="${some 
>> Expression}"
>> /> are not being evaluated, they look right but the expressions are
>> just printed out on the screen like this ${some Expression} as plain
>> text. Now it is not a problem with my tags because my <c:choose> tags
>> and others work fine. So it looks my core tags are working, but why 
>> are
>> my expressions not being executed?
>>
>>   Here is the page any suggestions?
>>
>> -Kurt
>>
>> code:
>>
>>
>> <%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
>> <%@ taglib uri="/WEB-INF/tld/sql.tld" prefix="sql" %>
>> <%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
>> <%@ taglib uri="/WEB-INF/tld/x.tld" prefix="x" %>
>>
>> <html>
>>    <head>
>>      <title>Search Result</title>
>>    </head>
>>    <body bgcolor="white">
>>
>>        <p>Create a <a href="newCreate.jsp">new Blog</a></p>
>>
>>    <c:choose>
>>      <c:when test="${not empty listQuery.rows}">
>>        Sorry, no existing blogs were found.
>>      </c:when>
>>      <c:otherwise>
>>
>>        The following soapbox articles were found:
>>
>>          <table border="1">
>>              <th>ID</th>
>>              <th>Date Created</th>
>>              <th>Date Last Modified</th>
>>              <th>Article Status</th>
>>              <th>Article Title</th>
>>              <th>Article Summery</th>
>>              <th>Edit</th>
>>              <th>Delete</th>
>>
>>              <c:forEach items="${listQuery.rows}" var="row">
>>              <tr>
>>              <td><c:out value="${row.id}" /></td>
>>              <td><c:out value="${row.dateCreated}" /></td>
>>              <td><c:out value="${row.dateLastModified}" /></td>
>>              <td><c:out value="${row.articleStatus}" /></td>
>>              <td><c:out value="${row.articleTitle}" /></td>
>>              <td><c:out value="${row.articleSummery}" /></td>
>>              <td><a href="currentQuery.jsp?id=<c:out value="${row.id}"
>> />">Edit</a></td>
>>              <td><a href="delete.jsp?id=<c:out value="${row.id}"
>> />">Delete</a></td>
>>              </tr>
>>              </c:forEach>
>>          </table>
>>
>>      </c:otherwise>
>>    </c:choose>
>>
>>    </body>
>> </html>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>


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


Re: EL expression not evaluating

Posted by Dima Gutzeit <di...@mailvision.net>.
Hi,

Take a look on the web.xml file of your application. It should begin with
the following :

<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" >

Hope it helps.



----- Original Message ----- 
From: "clunkyrobot" <cl...@fastmail.fm>
To: <ta...@jakarta.apache.org>
Sent: Monday, September 06, 2004 16:32
Subject: EL expression not evaluating


> Hi - I am building a blog in the JSP and JSTL and EL and Tomcat and
> MySQL.
>
>   So far I have installed Tomcat 5, with MySQL 4.x.x, and the Jakarta
> Core Tags version 2, all seems to be functioning. I am using Intellij
> IDEA 4.5 as my IDE. Now all seems to be running fine, no errors,
> Intellij IDEA is configured and sees what it needs, and look happy.
>
>   Problem 01 - My EL expressions in my <c:out value="${some Expression}"
> /> are not being evaluated, they look right but the expressions are
> just printed out on the screen like this ${some Expression} as plain
> text. Now it is not a problem with my tags because my <c:choose> tags
> and others work fine. So it looks my core tags are working, but why are
> my expressions not being executed?
>
>   Here is the page any suggestions?
>
> -Kurt
>
> code:
>
>
> <%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
> <%@ taglib uri="/WEB-INF/tld/sql.tld" prefix="sql" %>
> <%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
> <%@ taglib uri="/WEB-INF/tld/x.tld" prefix="x" %>
>
> <html>
>    <head>
>      <title>Search Result</title>
>    </head>
>    <body bgcolor="white">
>
>        <p>Create a <a href="newCreate.jsp">new Blog</a></p>
>
>    <c:choose>
>      <c:when test="${not empty listQuery.rows}">
>        Sorry, no existing blogs were found.
>      </c:when>
>      <c:otherwise>
>
>        The following soapbox articles were found:
>
>          <table border="1">
>              <th>ID</th>
>              <th>Date Created</th>
>              <th>Date Last Modified</th>
>              <th>Article Status</th>
>              <th>Article Title</th>
>              <th>Article Summery</th>
>              <th>Edit</th>
>              <th>Delete</th>
>
>              <c:forEach items="${listQuery.rows}" var="row">
>              <tr>
>              <td><c:out value="${row.id}" /></td>
>              <td><c:out value="${row.dateCreated}" /></td>
>              <td><c:out value="${row.dateLastModified}" /></td>
>              <td><c:out value="${row.articleStatus}" /></td>
>              <td><c:out value="${row.articleTitle}" /></td>
>              <td><c:out value="${row.articleSummery}" /></td>
>              <td><a href="currentQuery.jsp?id=<c:out value="${row.id}"
> />">Edit</a></td>
>              <td><a href="delete.jsp?id=<c:out value="${row.id}"
> />">Delete</a></td>
>              </tr>
>              </c:forEach>
>          </table>
>
>      </c:otherwise>
>    </c:choose>
>
>    </body>
> </html>



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