So does that mean that what I am trying to do can't be done ... I guess so?
If that is the case, can you suggest what I can do where I need to rewrite string in the JSP where the string that needs to be rewritten is the result of a JSTL tag? In my example is the string returned from a database query. Thanks again, Stef ----- Original Message ----- From: "Henri Yandell" <[EMAIL PROTECTED]> To: "Tag Libraries Users List" <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002 1:13 AM Subject: Re: Passing taglibs into bean methods. > > > On Tue, 15 Oct 2002, Stefan wrote: > > > Hi, > > > > I have a bean that I use to format text in my JSP pages. The bean contains several methods that take strings as arguements and then returns a string. > > > > The following is an attempt to use such a bean method, but it seems the tag is not passing the processed result, instead the tag is being passed as a literal string (for lack of better terms). > > > > > > <%= gui.displaySex("<c_rt:out value='${value.sex}'/>")%> > > > > The tag normally returns either 'm' or ' f ' but inside the scriptlet the method gets the actual tag? > > > > <c_rt:out value='${value.sex}'/> > > > > Instead of the rendered value. > > > > As you may have noticed I am trying to use the rt version of the core taglib thinking that this might do the trick. > > > > Any suggestions, > > <c_rt:out .../> is a JSP tag. ie) an element of the JSP language. > <%= %> [and others like <% %>] are JSP tags which wrap Java. > gui.displaySex is Java. > > I'm skating a little fine with the definitions, but the basic problem is > that you have JSP code where the system expects Java code. > > Would you expect: > > <img src="http://example.com/index.html"> to work? > > No, because an image doesn't expect a html page, it expects an image, be > in png/jpeg/gif etc. Same thing here. <% %> <%= %> effectively mark the > entry into a different type of context, similar to how " marks the exit > from Java syntax and entry into String syntax. > > ie) "if {" is different to if { > > The rtexpr bit means that you could do: > > <c:out value="value--[<c:out value="foo"/>]"/> or some such > > ie) a c:out in the attribute of another c:out [or other tag]. > > Hen > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>