tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nauman Khan <Nauman.K...@fish4.co.uk>
Subject RE: configuring a jsp-tag attribute dynamically with a Parameter
Date Fri, 04 Aug 2000 15:25:49 GMT
Thomas,

The attribute needs to have rtexprvalue=true in the tag library descriptor
file. This tells TOMCAT that the attribute is an expression that needs to be
evaluated. The default is false, which tells TOMCAT that it is a static
value.

See the following link for examples. I think you will fing pages 319 onwards
especially helpful.

http://developer.java.sun.com/developer/Books/cservletsjsp/chapter14.pdf

Regards

Naum


-----Original Message-----
From: Thomas Schreiner [mailto:tschrein@infomatec.de]
Sent: Friday, August 04, 2000 3:35 PM
To: taglibs-user@jakarta.apache.org
Subject: configuring a jsp-tag attribute dynamically with a Parameter


Hi,

I'm trying to do configure a jsp-Tag-attribute dynamically with an
parameter that is given to the page when a user views it. Following
is the code from the jsp-page:

#######
<%@ page language="java" %>
<%@ taglib uri="e2webproto.tld" prefix="login" %>

<html>
  <body>   <h1>Success!</h1>

    category = <%=request.getParameter( "category" )%>
    <login:categorycontext category="<%=request.getParameter(
"category" )%>" >

    </login:categorycontext>

  </body>
</html>
#########

When I try to laod the page with the browser and the given Parameter I
get the following Exception:
org.apache.jasper.compiler.ParseException:
D:\Programme\jakarta-tomcat\webapps\login\success.jsp(6,71) Attribute
category has no value

When I replace <%=request.getParameter( "category" )%> within the tag
with a static value like "foo" everything is ok, I get the Parameter
given to the page because of
the first line and foo becaus of the second one.

Next thing I did was changing the code produced from the JSP-Engine in
the work
directory and compiling the servlet by myself. I inserted
the getParameter thing at the apropriate place that it is the the value
for
the JSP-Tag-Argument and the page was displayed correctly.

Is this a Bug in the JSP-Engine or what am I doing wrong?

Any help is appreciated,
Thomas


Mime
View raw message