Bug 5665 - Problems using the core taglibrary
Summary: Problems using the core taglibrary
Status: RESOLVED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-02 12:19 UTC by john
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description john 2002-01-02 12:19:43 UTC
Am having problems using the jsptl ea release 3.  Am trying to do in a jsp:

<c:if test="<%=portbean.containsError("myError")%>">
   ...
</c:if>

Compiler complains that attribute myError is not defined.

However, the following works:
<c:if test="<%=portbean.containsError(\"myError\")%>">
   ...
</c:if>

Is this the way this is supposed to work?  Escaping the quotes is very awkward.


Taglib config for the page:
<%@ taglib uri="http://jakarta.apache.org/taglibs/input-0.90" prefix="input" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/ea/core-rt" %>
Comment 1 Shawn Bayern 2002-01-02 13:03:50 UTC
This is an issue with JSP in general, not JSTL in particular.

As for your questions -

- You can use single quotes to avoid any metacharacter
  escaping.  E.g. -

     '<%= method("string") %>'

- Many recommend using the "expression language" to avoid
  rtexprvalues ("<%= ... %>") entirely.

Shawn