Yes and this is my web.xml declaration:
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
I cannot even bind my tag to my components like this:
<mine:mytag binding="#{mybean.mytag}" >
.....
</mine:mytag>
because its reading all attributes as literal strings.
On 10/16/07, David Smith <[EMAIL PROTECTED]> wrote:
>
> I haven't done anything with Tomcat 6 and the #{ ... } el expressions
> yet, but I know in the past when EL features weren't working, it's been
> the fault of the version declaration in the web.xml. Did you declare
> your webapp to be servlet/jsp spec that supports this kind of EL
> expression?
>
> Any other thoughts on the matter from anyone??
>
> -David
>
> Tinashe B Chipomho wrote:
>
> >Looks like my last post was not sucessful,
> >Can someone please tell me this is not a bug in Tomcat 6, its too
> obvious
> >and to some extend unacceptable I must be doing something wrong.
> >Here is my problem, I have written my own custom component to display a
> div
> >tag.
> >
> >the JSP is as follows:
> >
> ><faces:view>
> ><html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html;
> charset=UTF-8"/>
> > <title>My Custom Tags</title>
> > </head>
> > <body>
> > <html:form>
> > <h2>Cat In The Rain</h2>
> > <mine:mytag title="#{index.title}">Dancing in the
> rain.</mine:mytag>
> > </html:form>
> > </body>
> ></html>
> ></faces:view>
> >
> >The tag class is given below:
> >This text #{index.title} is being interpreted as Literal text which is
> >obviously wrong, when deployed in glassfish the code works fine.
> >Output text in my tomcat console is
> >
> >MyTag.setProperties(): Title is literal text....
> >MyTag.setProperties(): title value= #{index.title}
> >MyTag.setProperties(): Title Value expression is null
> >
> >
> >The Tag class.
> >
> >public class MyTag extends UIComponentELTag{
> >
> > private ValueExpression title;
> >
> > public String getComponentType() {
> > return "test.MyOutput";
> > }
> >
> > public String getRendererType() {
> > return "test.MyRenderer";
> > }
> >
> > @Override()
> > protected void setProperties(UIComponent component) {
> > super.setProperties(component);
> > if (null!= title){
> > if (!title.isLiteralText()){
> > component.setValueExpression("component.title", title);
> > System.out.println("MyTag.setProperties(): Its not literal
> text.");
> > System.out.println("MyTag.setProperties (): title
> value
> >= "+ title.getValue(getELContext()));
> > }
> > else{
> > component.getAttributes().put("component.title",
> >title.getExpressionString());
> > System.out.println ("MyTag.setProperties(): Title is literal
> >text....");
> > System.out.println("MyTag.setProperties(): title
> value=
> >"+ title.getExpressionString());
> > }
> > }
> > System.out.println ("MyTag.setProperties(): Title Value expression is
> "+
> >component.getValueExpression("component.title"));
> > }
> >
> >
> >The component class.
> >public class MyOutput extends UICommand{
> > public MyOutput(){
> > setRendererType("test.MyRenderer");
> > }
> >
> > @Override()
> > public String getFamily() {
> > return "test.MyOutput";
> > }
> >}
> >
> >The tld file
> ><?xml version=" 1.0 " encoding="UTF-8"?>
> ><taglib version="2.0"
> > xmlns="http://java.sun.com/xml/ns/j2ee "
> > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> >web-jsptaglibrary_2_0.xsd">
> > <tlib-version> 1.0</tlib-version>
> > <short-name>mine</short-name>
> > <uri>http://www.my-tests.com </uri>
> > <tag>
> > <name>mytag</name>
> > <tag-class> test.MyTag</tag-class>
> > <body-content>JSP</body-content>
> > <description></description>
> > <attribute>
> > <name>binding</name>
> > <required>false</required>
> > <rtexprvalue>true</rtexprvalue>
> > <deferred-value>
> > <type>test.MyOutput</type>
> > </deferred-value>
> > <description>
> > A ValueExpression that resolves to the UIComponent that
> >corresponds
> > to this tag. This binding allows the Java bean that contains
> the
> >UIComponent
> > to manipulate the UIComponent, its properties, and its
> children.
> > </description>
> > </attribute>
> > <attribute>
> > <name>title</name>
> > <required>false</required>
> > <deferred-value>
> > <type>java.lang.String</type>
> > </deferred-value>
> > <description></description>
> > </attribute>
> > <attribute>
> > <name>rendered</name>
> > <required>false</required>
> > <deferred-value>
> > <type>boolean</type>
> > </deferred-value>
> > <description><![CDATA[ Use the rendered attribute to indicate
> >whether the HTML code for the
> > component should be included in the rendered HTML page. If set to false,
> > the rendered HTML page does not include the HTML for the component. If
> > the component is not rendered, it is also not processed on any
> subsequent
> > form submission.
> >]]></description>
> > </attribute>
> > <attribute>
> > <name>id</name>
> > <required>false</required>
> > <rtexprvalue>true</rtexprvalue>
> > </attribute>
> >
> > </tag>
> >
> ></taglib>
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: [email protected]
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
"If you are born once you will die twice, but if you are born twice you will
only die once" -- Are you born again?
Regards