• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to use jstl in jsp2.0  RSS feed

 
chang Anne
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
As I execute the following codes in jsp 2.0, I get the following error messages
org.apache.jasper.JasperException: /SimpleBean.jsp(15,0) According to
TLD or attribute directive in tag file, attribute value does not accept any expressions
Here's the code:
<%@ page language = "java" contentType = "text/html;charset=Big5" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %><html><body>Hi<jsp:useBean id = "myBean" scope = "page" class="javabean.SimpleBean"/><jsp:setProperty name="myBean" property="*" /><jsp:getProperty name="myBean" property="name" />Hi again:<c ut value="${myBean.name}" /></html></body>
Could someone can tell me how to fix the problem?
Thanks.
 
Sal DiStefano
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I'm not positive but it looks like a syntax error, Jasper(Tomcat) is trying to validate your code and cannot because of the missing colon in the c tag.
<%@ page language = "java" contentType = "text/html;charset=Big5" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<html>
<body>Hi
<jsp:useBean id = "myBean" scope = "page" class="javabean.SimpleBean"/>
<jsp:setProperty name="myBean" property="*" />
<jsp:getProperty name="myBean" property="name" />
Hi again:
---------<c <-- No Colon here? ut value="${myBean.name}" />
</html>
</body>
Good Luck
Sal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!