Regarding Point #2, why doesn't the <%=...%> in the jsp:useBean work.
why should it work?
Isn't the point to compile once, the first time, and not again
during running? It might compile the code the first time with
the substitution, but thereafter it will use the same precompiled
value, which is certainly what you do not want.
Regards,
Larry
--
Larry Tate [EMAIL PROTECTED] (757)726-6662
Bldg 135, Ft. Monroe, VA, 23651
-----Original Message-----
From: Martin Leboeuf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 09, 1999 10:12 AM
To: [EMAIL PROTECTED]
Subject: Trying again !
Hi !
Some time ago, I posted three questions to the list. Since I unfortunately
have not yet seen an answer to anyone of them, I was wondering :
a) is it because noone has a clue about the problems I submitted
b) or because my emails are not reaching anybody (in which case this one
won't, either ...)
So, let me ask again, in the hope of hearing something this time :
#1:
I have servlets dispatching requests to JSP pages. These servlets set
attributes which I want to use in the JSP pages. To get a list of all
attributes set, I would like to use the getAttributeNames() method of the
request object available in the JSP pages. However, this method always
returns me an empty enumeration. But I have access to my attributes through
the getAttribute() method. Am I missing something here ?
#2
I am trying to use a bean in a JSP page using the beanName attribute of the
<jsp:useBean> tag, giving IT a request-time attribute expression, with a
syntax like:
<jsp:useBean id="mybean" scope="session" beanName=<%=
session.getValue("billtoname") %> type="a.b.MyBean"/>
And the servlet dispatching to this JSP page has the following line to set
the attribute:
HttpSession session;
session.putValue("billtoname","a.b.MyBean");
And this does not work. I have tried very many variant of the above, to no
avail.
btw, if I repace the request-time attribute expression by a String, like :
beanName="a.b.MyBean"
everything works just fine. What did I miss ?
#3
While on the subject :(of the usefulness of beans)
If the property I am trying to extract from my bean is an array or a vector,
on which I will eventually want to loop, then the <jsp:getProperty> tag is
useless, since it returns one big string containing all elements of the
array/vector. Unless I missed something. Any comments ? What about
setProperty ?
Thanx for your help.
Martin Leboeuf
[EMAIL PROTECTED]
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html