[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglibs-user
Subject:    RE: configuring a jsp-tag attribute dynamically with a Parameter
From:       Nauman Khan <Nauman.Khan () fish4 ! co ! uk>
Date:       2000-08-04 15:25:49
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic