You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Marcello Britto <mb...@gmail.com> on 2010/01/19 13:34:39 UTC

Tiles 2.1.4(j4)

Hi all,

I'm trying to use Tiles 2.1.4(j4) with jdk 1.4 and weblogic 8.1 (servlet 2.3
and jsp 1.2). The project documentation says that is required servlet 2.4
and jsp 2.0, anyone knows how to use tiles in this enviroment? Some old
version? At the site is available to download only the version 2.1.x and
2.2.x.

The problem that i have is with the taglib. I think there are others ..

/pages/template.jsp(2): Error in using tag library uri='
http://tiles.apache.org/tags-tiles' prefix='tiles': type mismatch for
property 'defaultValueType', for Tag class
'org.apache.tiles.jsp.taglib.InsertAttributeTag': tld says java.lang.Object,
implementation type is java.lang.String
probably occurred due to an error in /pages/template.jsp line 2:
 <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

Configuration:

*web.xml*

    <context-param>
        <param-name>
            org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
        </param-name>
        <param-value>/WEB-INF/tiles-defs.xml</param-value>
    </context-param>

    <servlet>
        <servlet-name>TilesServlet</servlet-name>
        <servlet-class>
            org.apache.tiles.web.startup.TilesServlet
        </servlet-class>
        <load-on-startup>2</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>TilesDispatchServlet</servlet-name>
        <servlet-class>
            org.apache.tiles.web.util.TilesDispatchServlet
        </servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>TilesDispatchServlet</servlet-name>
        <url-pattern>*.tiles</url-pattern>
    </servlet-mapping>

*tiles-defs.xml*

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles
Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
    <definition name="page01" template="/pages/template.jsp">
        <put-attribute name="body" value="/pages/page01.jsp" />
    </definition>
</tiles-definitions>

*template.jsp*

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

<html>
<head>
    <title>TEST</title>
</head>
<body>
    <h1> TEMPLATE </h1>
    <br/><br/>
    <tiles:insertAttribute name="body"/>
</body>
</html>

Re: Tiles 2.1.4(j4)

Posted by Antonio Petrelli <an...@gmail.com>.
2010/1/19 Marcello Britto <mb...@gmail.com>:
> The tiles used in struts 1.3 works with servlet 2.3/jsp2.0, but i need
> to use tiles without struts. Do you have any suggestion? :]

Use Tiles 1, i.e. Struts Tiles, you can still use it.

Antonio

Re: Tiles 2.1.4(j4)

Posted by Marcello Britto <mb...@gmail.com>.
hi Antonio,

I run the same code at other enviroment, with servlet 2.4 and jsp 2.0,
and it works correctly. But my reality is servlet 2.3 and jsp 2.0
especification.

The tiles used in struts 1.3 works with servlet 2.3/jsp2.0, but i need
to use tiles without struts. Do you have any suggestion? :]

Marcello

On 1/19/10, Antonio Petrelli <an...@gmail.com> wrote:
> 2010/1/19 Marcello Britto <mb...@gmail.com>:
>>servlet 2.3 and jsp 1.2
>
> BTW, this environment is not supported, sorry. Your project will fail
> due to missing methods.
>
> Antonio
>

Re: Tiles 2.1.4(j4)

Posted by Antonio Petrelli <an...@gmail.com>.
2010/1/19 Marcello Britto <mb...@gmail.com>:
>servlet 2.3 and jsp 1.2

BTW, this environment is not supported, sorry. Your project will fail
due to missing methods.

Antonio

Re: Tiles 2.1.4(j4)

Posted by Antonio Petrelli <an...@gmail.com>.
2010/1/19 Marcello Britto <mb...@gmail.com>:
> /pages/template.jsp(2): Error in using tag library uri='
> http://tiles.apache.org/tags-tiles' prefix='tiles': type mismatch for
> property 'defaultValueType', for Tag class
> 'org.apache.tiles.jsp.taglib.InsertAttributeTag': tld says java.lang.Object,
> implementation type is java.lang.String

This is a Tiles bug, can you open a JIRA issue for this?
http://issues.apache.org/struts/browse/TILES

Thanks
Antonio