You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by "Rama, Shreekantha" <Sh...@compuware.com> on 2008/11/24 14:29:11 UTC

Tiles 2 with Spring 2.6

Hi, 

      One of my team member is trying to use Tiles 2 with Spring 2.6,
but getting uri:absolute not found error.
      They have tried multiple things and it does'nt seem to work. Can
anyone pls help ?? 

     usage in jsp: 

     <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"
%>


      Here's the config data: 
     
      tiles-def.xml
------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD
Tiles Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
  <definition name="myapp.homepage" template="/layouts/classic.jsp">
    <put-attribute name="title" value="Tiles tutorial homepage" />
    <put-attribute name="header" value="/tiles/banner.jsp" />
    <put-attribute name="menu" value="/tiles/common_menu.jsp" />
    <put-attribute name="body" value="/tiles/home_body.jsp" />
    <put-attribute name="footer" value="/tiles/credits.jsp" />
  </definition>
</tiles-definitions>


tiles-servlet
-----------------
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
	
http://www.springframework.org/schema/beans/spring-beans.xsd">

	<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
		<property name="definitions">
			<list>
				<value>/WEB-INF/tiles-def.xml</value>
			</list>
		</property>
	</bean>

	<bean id="tilesViewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
		<property name="viewClass"
value="org.springframework.web.servlet.view.tiles2.TilesView" />
	</bean>

	<bean id="urlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
		<property name="mappings">
			<props>
				<prop
key="/**/*.html">viewController</prop>
			</props>
		</property>
	</bean>

	<bean id="viewController"
class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>

</beans>

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

<listener>
 
<listener-class>org.springframework.web.context.ContextLoaderListener</l
istener-class>
    </listener>
     <listener> 
 
<listener-class>org.apache.tiles.web.startup.TilesListener</listener-cla
ss> 
     </listener> 
     
    <servlet>
        <servlet-name>tiles</servlet-name>
 
<servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
        <init-param>
            <param-name>
 
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
            </param-name>
            <param-value>
              /WEB-INF/tiles-def.xml
            </param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
     </servlet>
   <servlet>
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

Re: Tiles 2 with Spring 2.6

Posted by Antonio <an...@gmail.com>.
2008/11/24 Rama, Shreekantha <Sh...@compuware.com>:
> servlet 2.5

ok.

> we use Netbeans 6.1

Sorry I wrote container while I meant application server (Tomcat etc.)

Antonio

RE: Tiles 2 with Spring 2.6

Posted by "Rama, Shreekantha" <Sh...@compuware.com>.
Not sure what you asked. 

servlet 2.5
we use Netbeans 6.1 



The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

From: Antonio [mailto:antonio.petrelli@gmail.com] 
Sent: Monday, November 24, 2008 11:07 AM
To: users@tiles.apache.org
Subject: Re: Tiles 2 with Spring 2.6

2008/11/24 Rama, Shreekantha <Sh...@compuware.com>:
> Yes, Antonio,
>
> All the tiles jars are added to the lib.
>
> tiles-jsp-2.0.6.jar
> tiles-core-2.0.6.jar

This is strange... in tiles-jsp there are TLD files that should be
automatically recognized.
What container and version are you using?
What version of servlet are you using? (you can see it in the root
element of web.xml)

Antonio

Re: Tiles 2 with Spring 2.6

Posted by Antonio <an...@gmail.com>.
2008/11/24 Rama, Shreekantha <Sh...@compuware.com>:
> Yes, Antonio,
>
> All the tiles jars are added to the lib.
>
> tiles-jsp-2.0.6.jar
> tiles-core-2.0.6.jar

This is strange... in tiles-jsp there are TLD files that should be
automatically recognized.
What container and version are you using?
What version of servlet are you using? (you can see it in the root
element of web.xml)

Antonio

RE: Tiles 2 with Spring 2.6

Posted by "Rama, Shreekantha" <Sh...@compuware.com>.
Yes, Antonio,  

All the tiles jars are added to the lib. 

tiles-jsp-2.0.6.jar
tiles-core-2.0.6.jar

-Shree


The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

From: Antonio [mailto:antonio.petrelli@gmail.com] 
Sent: Monday, November 24, 2008 9:25 AM
To: users@tiles.apache.org
Subject: Re: Tiles 2 with Spring 2.6

2008/11/24 Rama, Shreekantha <Sh...@compuware.com>:
> Exact error: The absolute URI:http://tiles.apache.org/tags-tiles 
> cannot be resolved either in web.xml or the jar files.

Now it's clearer.
Did you put tiles-jsp.ar package in WEB-INF/lib?

Antonio

Re: Tiles 2 with Spring 2.6

Posted by Antonio <an...@gmail.com>.
2008/11/24 Rama, Shreekantha <Sh...@compuware.com>:
> Exact error: The absolute URI:http://tiles.apache.org/tags-tiles cannot
> be resolved either in web.xml or the jar files.

Now it's clearer.
Did you put tiles-jsp.ar package in WEB-INF/lib?

Antonio

RE: Tiles 2 with Spring 2.6

Posted by "Rama, Shreekantha" <Sh...@compuware.com>.
My mistake, It is Spring framework 2.5.6-with-dependencies
Getting an error at compile stage so, no stacktrace..
 
Exact error: The absolute URI:http://tiles.apache.org/tags-tiles cannot
be resolved either in web.xml or the jar files.


Versions used are :-   tiles-2.0.6 and spring 2.5.6 


Shree


The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

From: Antonio [mailto:antonio.petrelli@gmail.com] 
Sent: Monday, November 24, 2008 8:58 AM
To: users@tiles.apache.org
Subject: Re: Tiles 2 with Spring 2.6

2008/11/24 Rama, Shreekantha <Sh...@compuware.com>:
>      One of my team member is trying to use Tiles 2 with Spring 2.6

Does Spring 2.6 even exist?
What version of Tiles and Spring are you using?

> but getting uri:absolute not found error.

This does not seem to be a Tiles error. Is there a stacktrace?

Antonio

Re: Tiles 2 with Spring 2.6

Posted by Antonio <an...@gmail.com>.
2008/11/24 Rama, Shreekantha <Sh...@compuware.com>:
>      One of my team member is trying to use Tiles 2 with Spring 2.6

Does Spring 2.6 even exist?
What version of Tiles and Spring are you using?

> but getting uri:absolute not found error.

This does not seem to be a Tiles error. Is there a stacktrace?

Antonio